andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

The Friend Finder - MapActivity using GPS - FULL SOURCE

Goto page Previous  1, 2, 3, 4, 5  Next
 
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials
Author Message
theseum
Once Poster


Joined: 23 Feb 2008
Posts: 1

PostPosted: Sat Feb 23, 2008 12:36 am    Post subject: Reply with quote

Why is the custom intent reciever / filter in the java sources instead of in manifest.xml? I'm not sure I quite understand how manifest.xml works...

Thanks!
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Sat Feb 23, 2008 12:00 pm    Post subject: Reply with quote

Hello theseum,

it is placed inside the java-code because we are listening for "internal events" only.

One usually creates an IntentReceiver-Class and places it to the AndroidManifest.xml, if we need to listen for anything else than our own app.

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
crayder
Freshman


Joined: 04 Feb 2008
Posts: 9

PostPosted: Sat Feb 23, 2008 10:32 pm    Post subject: Reply with quote

Hey, guys!
I have one question... according the working of this application on the real devices. Don't you think that attempt to retrieve device location can last much time (gps turning on, satellite communication and so on..). This can lead to the situation that GUI process will be blocked and that user will receive message with prompt to kill this process. What do you think about this?
Back to top
View user's profile Send private message
zoe11
Freshman


Joined: 25 Feb 2008
Posts: 5
Location: Indonesia

PostPosted: Mon Feb 25, 2008 7:33 am    Post subject: can't run friendfinder with m5 for windows xp Reply with quote

plusminus please help..!!!i can't run friendfinder program with new android sdk for windows xp, i use eclipse.
R.java won't auto update and there is many error
Back to top
View user's profile Send private message Send e-mail
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Mon Feb 25, 2008 9:47 am    Post subject: Reply with quote

Hello zoe,

what exactly is your problem (are you sure it is just updating?).

I know, a non updating R.java can freak one out!
Some succeed in turning off "Build Automatically" and Build manually.

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
zoe11
Freshman


Joined: 25 Feb 2008
Posts: 5
Location: Indonesia

PostPosted: Mon Feb 25, 2008 5:03 pm    Post subject: already solve the problem Reply with quote

many thanks for your hint plusminus!!now i alrweady solve the R.java problem and the error on xml file Smile
plusminus i need your help on how to push my nmea into android emulator??so i can have my own mock-providers in jakarta coz SF is to far.
i already have my $GPRMC route but i'm clueless on how to make it work in android emulator so i can change the ME location in friendfinder app
Back to top
View user's profile Send private message Send e-mail
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Tue Feb 26, 2008 7:55 pm    Post subject: Reply with quote

Hello zoe,

Its probably not more than exchanging the "nmea"-file on the emulator.

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kleach
Freshman


Joined: 16 Jan 2008
Posts: 3

PostPosted: Wed Feb 27, 2008 12:54 am    Post subject: Reply with quote

I get an error in AndroidManifest.xml in M5? on this line...


XML:
       <activity class=".FriendFinder" android:label="@string/main_title">


Error is: Tag <activity> missing required attribute name.

I used the .zip file and added

XML:
   <uses-permission android:name="android.permission.ACCESS_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_GPS"/>


to the file

I don't get it...
suggestions?

-Ken
Back to top
View user's profile Send private message
gvkreddyvamsi
Developer


Joined: 21 Jan 2008
Posts: 43
Location: INDIA

PostPosted: Wed Feb 27, 2008 6:02 am    Post subject: Security Exception Reply with quote

HI,

I have loaded friend finder application.

Rectified errors in it.

But i got security Exception....

These permissions already added in manifest file..
XML:


    <uses-permission id="android.permission.READ_CONTACTS"/>
    <uses-permission id="android.permission.CALL_PHONE"/>



Screen shot is loaded


by
vamsi



and.PNG
 Description:
FriendFinder
 Filesize:  46.58 KB
 Viewed:  1500 Time(s)

and.PNG


Back to top
View user's profile Send private message Send e-mail Visit poster's website
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Wed Feb 27, 2008 10:53 am    Post subject: Reply with quote

Hello vamsi,

since m5 it is also "android:name" instead of "id", like this:

XML:
   <uses-permission android:name="android.permission.READ_CONTACTS"/>


Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ramakrishna
Freshman


Joined: 10 Dec 2007
Posts: 2

PostPosted: Mon Mar 03, 2008 12:20 pm    Post subject: Reply with quote

I am also facing the same problem while running FriendFinder application in M5... It is running perfectly fine with M3.
I changed the required things in "AndroidManifest.xml" but still it is giving the error attached Sad .
Please help !



error.JPG
 Description:
 Filesize:  31.05 KB
 Viewed:  1385 Time(s)

error.JPG


Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Tue Mar 04, 2008 7:14 pm    Post subject: Reply with quote

Hello Ramakrishna,

it would be helpful, if you debug and post the line, where the exception is thrown.

Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
aaronsu
Once Poster


Joined: 06 Mar 2008
Posts: 1
Location: Taiwan

PostPosted: Thu Mar 06, 2008 3:32 am    Post subject: Reply with quote

hi plusminus

i have got the same exception and i found it was thrown at

LocationProvider provider = providers.get(0);

because of the providers's size = 0

you should add the permission into manifest file

XML:
<uses-permission android:name="android.permission.ACCESS_LOCATION"/>


then workable ~~ Very Happy

aaron))))
Back to top
View user's profile Send private message
plusminus
Site Admin


Joined: 14 Nov 2007
Posts: 2102
Location: Germany

PostPosted: Fri Mar 07, 2008 12:54 am    Post subject: Reply with quote

Hello aaron,

thanks for you suggestion. (this tut was mad for sdk-version m3)

In m5 I'm currently using:
Java:
LocationProvider provider = this.myLocationManager.getProvider("gps");


Regards,
plusminus

_________________

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pavanch
Freshman


Joined: 07 Mar 2008
Posts: 2

PostPosted: Fri Mar 07, 2008 7:44 pm    Post subject: Reply with quote

hello

I am running on the new emulator/sdk. Everything works from the code you pasted above with the
changes suggested in the comments section. But it still doesnt show me the distance in my display.

It says, 'distance not set'. I think i know the reason partly..as in the new emulator and GUI it doesnt give
me an option to add notes directly for a contact or more clearly there is no field called 'Notes' for
a contact.
To add something like a 'Notes' field, i need to add a new label and name it to 'Notes'.

So there is not direct URI/(constant like People.NAME etc) from which i can extract the geo string from a contact.

Have you played around with the new emulator and tried out this app?.

Like i said, i am only guessing..so if there is something i missed here, do let me know.

Thanks

Pavan



default new contact layout.JPG
 Description:
New GUI for adding a contact on new emulator. I didnt find a notes field here
 Filesize:  36.26 KB
 Viewed:  1271 Time(s)

default new contact layout.JPG



label for adding an address.JPG
 Description:
This is where i created a custom label called 'Notes' and added the geo string
 Filesize:  34.35 KB
 Viewed:  1271 Time(s)

label for adding an address.JPG


Back to top
View user's profile Send private message
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Map Tutorials All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.