The Friend Finder - MapActivity using GPS - FULL SOURCE

Tutorials that use the MapActivity. Many using GPS functionality.

Postby plusminus » Mon Dec 03, 2007 3:20 pm

Hello venkat,

it is displaying the list of your friends but you seem to have forgotten to set the "geo"-URI.

You go to the actual Map using the Menu-Button on the emulator. It starts the Map-Activity that show you (and your contacts/friends if you properly set the geo-URI to their notes, as shown in the first Part of the Tutorial)
This is the code taklen from above, that opens the MapActivity:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. @Override
  2.  
  3.      public boolean onCreateOptionsMenu(Menu menu) {
  4.  
  5.           boolean supRetVal = super.onCreateOptionsMenu(menu);
  6.  
  7.           menu.add(0, 0, getString(R.string.main_menu_open_map));
  8.  
  9.           return supRetVal;
  10.  
  11.      }
  12.  
  13.      @Override
  14.  
  15.      public boolean onOptionsItemSelected(Menu.Item item) {
  16.  
  17.           switch (item.getId()) {
  18.  
  19.                case 0:
  20.  
  21.                     startSubActivity(new Intent(this, FriendFinderMap.class), 0);
  22.  
  23.                     return true;
  24.  
  25.           }
  26.  
  27.           return false;
  28.  
  29.      }
Parsed in 0.033 seconds, using GeSHi 1.0.8.4


You will at least see yourself on the Map :!:

Please tell us if that fixed it :?:

Regards,
plusminus

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby venkat » Mon Dec 03, 2007 4:42 pm

dear +-,

now i can see contacts list with distance. if i click any one of the menu , i can see my name and one dot on blank map. map is blank :( .

can u solve my problem???

regards,
venkat
venkat
Senior Developer
Senior Developer
 
Posts: 152
Joined: Tue Nov 27, 2007 5:42 am
Location: India

Postby plusminus » Mon Dec 03, 2007 9:13 pm

Hello venkat,

that was a bad double-post ;) :arrow: answered here.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

About GPS

Postby gaojinxuan » Tue Dec 04, 2007 3:07 am

Hi.

Each phone can get it's location by it's own GPS device.
However, how can phone A get GPS position of other phone, like B, C... and track them?
Thanks a lot!
Throught Short Message?
gaojinxuan
Freshman
Freshman
 
Posts: 5
Joined: Tue Dec 04, 2007 2:58 am

Postby venkat » Tue Dec 04, 2007 6:40 am

hi +/-, sorry for my bad post :wink:

i can see only Blank Map, On Blank Map only i can see One "dot " with name "ME" and my listed name "Venkat".
when i press key 't' it's tagging the view, still it's showing blank only.

i try to run "maps" application which is give along with emulator, that is also showing "Blank map" only.

Can u tell me how to enable map on the emulaor??? :?:

I have attached my screen shot of friend Finder application. let's take look.

Thanks ,
regards,
venkat
Attachments
FriendFinder.png
my Screen shot of FriendFinder Application
FriendFinder.png (8.63 KiB) Viewed 10187 times
venkat
Senior Developer
Senior Developer
 
Posts: 152
Joined: Tue Nov 27, 2007 5:42 am
Location: India

Postby plusminus » Tue Dec 04, 2007 9:51 am

Hey guys,

@gaojinxuan:
Yes, it is possible with XMPP (basically nothing really different from a instant-messaging-conversation).
I'll make a tutorial on that if there is some free time between the million other things to do here ;)

@venkat:
it works, I can see "Me" and "venkat" :!: but you seem to have not correct connection to the internet out of the emulator :!:

Have a look at the proxy-issue here :arrow: here

Zooming in/out works, right :?:
Having zoomed in, you will see the "Me" walkign around on the map, don't you :?:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Postby venkat » Tue Dec 04, 2007 11:41 am

sorry for the inconvenience PlusMinus. I know, you will tied up with many works. but badly i struck with map application, i can't move ahead without displaying map. i would appreciate you if you help regarding this map issue. :) . While zoomed in, i can see the "Me" walkign around on the map(Blank map).

i can open web pages using browser application. but while opening the Web pages , application will ask authentication. anyway , i can open the web pages.
venkat
Senior Developer
Senior Developer
 
Posts: 152
Joined: Tue Nov 27, 2007 5:42 am
Location: India

Postby plusminus » Tue Dec 04, 2007 6:33 pm

Hello venkat,

can you explain what you mean with: "application will ask authentication" :?:

Sorry but it is always hard to help on an issue I never had myself :cry:

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby venkat » Wed Dec 05, 2007 6:37 am

Hi +-,
i am behind proxy server with authentication. i set the http_proxy setting and when ever i tried to open my browser i will ask me to enter user name and password. i have attached my screen shot of authentication.
Can u just tell me +-, it's necessary to set "xmpp settings" for opening map application???. if it so, can u tell me how to do it??? :)
Thanks in advance,

Regards,
venkat.
Attachments
proxy password.png
Authentication.
proxy password.png (28.15 KiB) Viewed 10153 times
venkat
Senior Developer
Senior Developer
 
Posts: 152
Joined: Tue Nov 27, 2007 5:42 am
Location: India

Postby plusminus » Wed Dec 05, 2007 10:51 pm

Hello venkat,

unfortunately i have the luck not to have problems with being behind a proxy :(

But I will keep my eyes open of course :!:

Best Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby quauhtlimtz » Thu Dec 06, 2007 6:33 pm

venkat, make sure you typed the latitude and longitude correctly on your contacts list notes section.
quauhtlimtz
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Nov 26, 2007 5:56 pm
Location: Mexico

Postby Ramakrishna » Mon Dec 10, 2007 12:33 pm

Hi,

I am also facing similar problem I can only see Blank Map with a "dot" at the center. I am also behind the firewall and set the proxy as follows:

Code: Select all
adb shell sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db ""INSERT INTO system VALUES(99,'http_proxy','[host]:[port]');""


and

Code: Select all
adb shell sqlite3 /data/data/com.google.android.browser/databases/browser.db ""INSERT INTO passwords VALUES(99,'host','username','password');""


I am able to browse the net through emulator but could not see the map for friend finder application.

I am attaching the error here.

Please help.

Thanks in advance
Ramakrishna

quauhtlimtz wrote:venkat, make sure you typed the latitude and longitude correctly on your contacts list notes section.



I had verified. both latitude and longitude are correct in notes section of my contacts list..
List showing the distance is getting refreshed but When it comes to Maps nothing is shown except "dot"'s as attached. :(
Attachments
Error.PNG
Error.PNG (6.59 KiB) Viewed 10022 times
Ramakrishna
Freshman
Freshman
 
Posts: 2
Joined: Mon Dec 10, 2007 10:28 am

Postby rmeph » Thu Dec 13, 2007 11:18 am

i run Friend Finder application on emulator....i have problem "org.anddev.android.friendfinder unable to start activity ComponentInfo {org.anddev.android.friendfinder/org.anddev.android.friendfinder.FriendFinder}:java.lang.IndexOutofBoundsException"

How to solved it???? :roll:
rmeph
Senior Developer
Senior Developer
 
Posts: 121
Joined: Mon Dec 10, 2007 1:54 pm
Location: India

Postby plusminus » Thu Dec 13, 2007 1:53 pm

Hello guys,

@ Ramakrishna:
Some say, that the Maps-Application is only possible by port 1080....
Have a look at the following posts:
:arrow: http://www.anddev.org/viewtopic.php?p=599#599
:arrow: http://www.anddev.org/viewtopic.php?p=797#797

@ rmeph:
Please use the debugger, to locate the specific line :!: As NullPointerExceptions can occur on many of the lines ;)

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby quauhtlimtz » Thu Dec 13, 2007 8:31 pm

venkat, be sure you are not using your wireless connection. Android only support wired internet connections.
quauhtlimtz
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Nov 26, 2007 5:56 pm
Location: Mexico

Top
PreviousNext

Return to Map Tutorials

Who is online

Users browsing this forum: Google [Bot] and 2 guests