last day (14 days later) » 

06:21
@Hina
whats your issue.??
i am working with databases in android eclipse
okkk
then?
i have 3 tables in that.. placetypes, place and placeinfo
kk
when i click on any placetype, it shows me the correct places against that id but it populates the same places on other placetypes too
06:27
can you show ur code?
ok wait
this is the placetype activity.. the first activity
package com.example.nearbyplaces;

import java.util.ArrayList;
import java.util.List;



import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;

public class PlaceTypesActivity extends Activity {

private ListView listView;
plz use pastie
i cant read here properly
what is pastie? :/
www.pastie.org
open this and paste your code
and click on create button
and then give me link of that
06:32
you are just moving to nextactivity??
right?
on item click
yes
this is another activity
kk
wait
and this is my database class
kkk
tell me now actual problem
i think it is in second activity
i click on any placetype item it shows me the correct places but in all the placetype items it populates the same places which is populated on first click of any item
06:36
you mean in placeactivity na.??
yes
check my queries too if the problem lies thr
yeah
did you trace your code at getallplaces method.?
yes i did
further it also shows me multiple entries of a single record :/ messed up with databases
because you didnt entered properly records in it..
06:50
have you know how many entries you entered in table?
you can see that in code..
each item is only entered once in the database because i have pass the condition
it means problem in your place table.
yaa.. i am unable to identify the problem :/
okk
wait
waiting
06:54
start tracing that method again
and before you set id and name
just print using sysout..
so you can know whts going on..
everything is coming in log
where?
i cant see there any log
i am talking about inside getalltype method..
oh ok
the problem i think is, once it takes the Type id and insert the places , next time type id is not set to what has been clicked
nd all the places for that respective type id is read..
07:03
but where??
inserting places using id.?
in getAllPlace method i am passing the placetype_name .. where it matches the id and in placetype and place table and show the relevent places
String selectQuery ="SELECT * FROM table_places INNER JOIN placetypes ON placetypes.type_id=table_places.type_id WHERE placetypes.type_name='"+typeName+"'";
this query ..
thats what i said that
just print records from that query
so, atleast you know that is it right or not.
i debugged the code, its right :/
ohhkkk
what to doooo ?
07:17
did you get placename properly in placeactivity?
did you know hindi.??? @Hina
noo hindii..
yes i get the correct place name
ohhkk
and you are also set there listview
for what??
didnt get the last thing.. wht???
in placeactiviy, you again set listview..
with placename..
07:20
and in placetypeactivity also..
why two times?
because placetype and places are different activities. i want listviews in both the activities
where is your placeinfoactivity..
?
show me that...
places set in the listview correctly first time on any click of placetype. the second time when i go back to placetype activity and click on any other placetype it doesnt change the places, shows me what it showed me for the first time.
ok let me send u that too
ok let me check ur placetypeactivity again.. :/
07:26
i.putExtra(PLACETYPE, type);
change this line in placetypeactivity
i.putExtra("ptype", type);
and
String x = check.getStringExtra(PlaceTypesActivity.PLACETYPE);
change this
ok wait
String x = check.getStringExtra("ptype");
no change :(
did you check your type name when you click second time after come back on that activity?
wait i am trying
07:35
kk
cant you test the code?
you didnt give me full code.. :P
so how can i..!!
should i give you ?
depend on you
please save me, i have my submission tomorrow :P
07:37
i will try
give me any id where i can send you
going for lunch
catch u after 15 min..
didnt get the id :/
08:15
u r lost? :O
@Hina
yes
ok m sending you
kk
kk
08:27
listen
yeah
in place activity the places wont come because it is coming on the basis of location.. so add some fields according to your location.
or just remove the code for tht in place activity
yeah doing that only
??
@Hina
08:34
i think it sets the items in list one time only.. the condition is working only once?
yes?
in placeactivity
you are inserting same records everytime
db.addplaces(new places(1,"Meezan Bank",24.874679,67.05607));
db.addplaces(new places(1,"NIB Bank",24.882232,67.064482));
db.addplaces(new places(1,"Bank Alfalah",24.878261,67.060619));
db.addplaces(new places(1,"Faysal Bank (Islamic Banking Branch)",24.885502,67.064396));
the first parameter is type id.. it matches the type id in both the tables and fill records
yeah but it inserting everytime..!!
08:37
this is the problem naa
its not problem.. :/
its mistake, stupid.
why ?
so what should i do instead of this
type id "1" is for ATM??
and all above records are for ATM?
08:39
yes
are u using gmail right nw?
i sent u request there.
i will accept that later
its better to talk thr
i m in mobile
thats why..
ok fine.
listen
08:40
hmm ?
what are the records for airport?
i have not completed filling the database
for now u can test it by putting any random record
kk
wait
just put conditions for that
like
if(x.equals("ATM"){
records
}
else if(x.equals("Airport"){
08:45
for each single placetype?
records
}
yuppp
because you are inserting records manually..
will this be a good approach?
right now, its good as per your manually insertion..
??
ok i m trying
listen
08:48
yes
you said that
records are multiple in that right??
then use this query for it
db.delete(YOUR_TABLE, ROW_ID + "=" + _id, null)
where id will be your ATM, Airport id..
and second thing,
use this query in each condition for all types..
where to do this :/
before you insert records yaar
08:51
no use..
what??
coz when i put the conditions.. den also it does the same thing as before
wait
i am doing.. :/ :/
ohk
do you know, if i am testing my application on mobile deivce, where could be my database file?
and btw i find problem while listing not while adding
you cant access in mobile
i also find
working on that
are solving it?
@Hina
09:03
tried.. but i am not getting what condition should i give so it matchess
hehe
ok then let me try
please try :P m so dead
jst wait
yes :)
09:18
any solution?
yup
just 2 min
09:29
??
doing yaar
your query is sucks
LOL..
which query?
getallplaces method
its so simple :/
nop
09:35
oki, u try
trying
u r disturbing me..
ok okk
done.. :P
lol yayyy
loll
09:39
now telll
nop.. :P :P
why ?:S
lolzzz
got it.?
yessss
kk
09:42
let me try
sure
why have u change distance to 3? that is not linked with anything :S
are i knw.
because i am using emulator
so just set it manually.
just change it according to you.
09:47
it isnt showing anything :s
first uninstall your application
then run again
i did that
wait
check ur mail
it works nw :P
okkk :)
congo
09:52
THANKSSS alottt :)
you saved me :D
np.. :)
wlcme..
btw can i ask u one more thing?
what
i know i have been irritating you all the time :P
all time.!!!
we knw each other just before 2 hours.. :P
09:53
i want to show google maps in my location activity.. but it doesnt show :$
:D :D
hahah that "2 hrs" must have been LONG for u :P
yeah.. :D :D
so, you want all codes from me.?? :P :P
i want help from you :P
okey.. :D :D
let me try
09:56
you can do it later as well, till night .. no rush :P
great.. :P
too much time for me. :P
hahaha..
i know u can do it.. u r a genius :P
hope this buttering helps me :D
u r buttering me.!!!! :D
btw, where is your mapactivity.?? @Hina
ahan, i need it in location activity..
its just giving location right now, i need to display that location in maps
that means you didnt try it??
10:01
I did.. i just deleted that code because it wasnt helping me..
 
1 hour later…
11:24
there?
11:47
??

last day (14 days later) »