| Author |
Message |
rmeph Senior Developer

Joined: 10 Dec 2007 Posts: 120 Location: India
|
Posted: Fri Dec 21, 2007 1:22 pm Post subject: |
|
|
i debugger code but not problem in code
when i started application ......in starting show error.
| Code: | | "org.anddev.android.friendfinder unable to start activity ComponentInfo {org.anddev.android.friendfinder/org.anddev.android.friendfinder.FriendFinder}:java.lang.IndexOutofBoundsException" |
|
|
| Back to top |
|
 |
|
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
Posted: Fri Dec 21, 2007 5:07 pm Post subject: |
|
|
Hello rmeph,
without the line the error occurs, we cannot help much
Does it happen on startup or when you click sth.
Did you create some Contacts before
Regards,
plusminus _________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
navajo Freshman

Joined: 21 Dec 2007 Posts: 4 Location: Germany
|
Posted: Fri Dec 21, 2007 6:38 pm Post subject: LocationSpot on Map is not updated (repainted)! |
|
|
Hi plusminus,
as i run ur code for first few times, the appl. worked properly, but now the spot position is not repainted anymore. Coordinates and distance are updated, but not the spot position on map.
This happened first time as i tried to center the map according to the actual position. I changed the code and than, after compile and relaunch repainting stopped. So i reversed all changes but still there is no repainting!
I even set a complete new project in eclipse and reused ur code there-->same problem. I moved the appl. out of emulator, tried all what came to my mind with adb_server commands, deleted tmp data of emulator... nothing helped. The rest is well-oiled except repainting the map...
I m using WinXP SP2 with Eclipse IDE and latest JDK.
Any idea what i can do more to solve this?
And one more question: is there a efficient way to center map to a actual locationSpot, so the map moves and not my location?
Many thanks to a helpful code! _________________ In a world without walls and fances... who needs Windows and Gates? |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
|
| Back to top |
|
 |
rmeph Senior Developer

Joined: 10 Dec 2007 Posts: 120 Location: India
|
Posted: Sat Dec 22, 2007 7:53 am Post subject: |
|
|
yes it's was happend on startup.........yes i created contacts before start application...........i debugger code but not problem in any line.....how to solved it?  |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
Posted: Sat Dec 22, 2007 5:18 pm Post subject: |
|
|
Hello rmeph,
the error should also occur, when you do "live"-debugging...
Set a breakpoint to the first line of every function and go through step by step.
Without the line we cannot really help
Regards,
plusminus _________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
|
|
 |
Constantine Freshman

Joined: 14 Jan 2008 Posts: 2
|
Posted: Mon Jan 14, 2008 1:53 am Post subject: ZIP |
|
|
Thank you for the work!
Can I please download this sample in a single zip file? |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
Posted: Mon Jan 14, 2008 8:27 am Post subject: |
|
|
Hello Constantine,
I just added it to the end of the first post as an attachment.
Regards,
plusminus _________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
shakespit Once Poster

Joined: 25 Jan 2008 Posts: 1
|
Posted: Fri Jan 25, 2008 6:04 pm Post subject: a better regexp for a geotag |
|
|
Hi plusminus!
I wrote a more powerful regular expression for geotags and moved it's compilation out from a do-while loop.
I expect geotag in following format:
| Code: | | geo: +/-lat (-90 to 90), +/-lng (-180 to 180) [, +/-alt] |
(based on http://tools.ietf.org/html/draft-mayrhofer-geo-uri-00 ) and regexp catches lat, lng and alt in groups 1, 5 and 13 respectively.
So no more # in geotag is required but it's ok if it'l stay there
I think that static function with a regexp parser will be more convinient, but anyway, here is my version of a refreshFriendsList ():
| Java: |
private void refreshFriendsList(){
Cursor c = getContentResolver().query(People.CONTENT_URI,
null, null, null, People.NAME + " ASC");
/* This method allows the activity to take
* care of managing the given Cursor's lifecycle
* for you based on the activity's lifecycle. */
startManagingCursor(c);
int notesColumn = c.getColumnIndex(People.NOTES);
int nameColumn = c.getColumnIndex(People.NAME);
// Moves the cursor to the first row
// and returns true if there is sth. to get
if (c.first()) {
// Pattern for extracting geo-ContentURIs from the notes.
final String geoPattern = "\\bgeo:\\s*([-+]?(90(\\.0*)?|[0-8]?[0-9](\\.[0-9]*)?))\\s*," + "\\s*([-+]?(1(80(\\.0*)?|[0-7]?[0-9](\\.[0-9]*)?)|([0-9]{1,2}(\\.[0-9]*)?)))(\\s*,\\s*([-+]?[0-9]*(\\.[0-9]*)?))?\\b";
// Compile and use regular expression
Pattern pattern = Pattern.compile(geoPattern);
do {
String notesString = c.getString(notesColumn);
Location friendLocation = null;
if (notesString != null) {
CharSequence inputStr = notesString;
Matcher matcher = pattern.matcher(inputStr);
if (matcher.find()) {
Double latid = Double.parseDouble(matcher.group(1));
Double longit = Double.parseDouble(matcher.group(5));
friendLocation = new Location();
friendLocation.setLatitude(latid.doubleValue());
friendLocation.setLongitude(longit.doubleValue());
}
}
String friendName = c.getString(nameColumn);
allFriends.add(new Friend(friendLocation, friendName));
} while (c.next());
}
}
|
|
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
Posted: Fri Jan 25, 2008 6:48 pm Post subject: |
|
|
Hi shakespit,
oops , of course pulling the pattern-compile out of the loop is very wise
Thx for sharing your thoughts.
Regards,
plusminus _________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
hama Freshman

Joined: 28 Dec 2007 Posts: 2
|
Posted: Wed Jan 30, 2008 1:05 pm Post subject: Application not Responding |
|
|
Hi, all
I have often experienced the alert of "Application not Responding".
The following warnings also appear in logcat.
W/ActivityManager( 465): Timeout of broadcast BroadcastRecord{4021f050 android.intent.action.LOCATION_CHANGED}
W/ActivityManager( 465): Receiver during timeout: BroadcastFilter{4020b368 android.app.IIntentReceiver$Stub$Proxy@4020b0d0}
I noticed that onReceiveIntent() is called in a chunky manner when such warnings/alert appear.
Does anyone have an idea why it occurs or how to fix it?
Thanks,
hama |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
|
| Back to top |
|
 |
nisha Experienced Developer

Joined: 15 Feb 2008 Posts: 80
|
Posted: Fri Feb 15, 2008 8:04 am Post subject: Including Search and Direction options in FriendFinder |
|
|
hi plusminus,
I am new to android.. i tried ur friendfinder and it is really good.. Can you tel me how to include search and direction options, so that i can get the complete path to reach my friend.. which is similar to cellidtolatlong tutorial..
It would be nice if you reply me as early as possible..
Thanks  |
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2639 Location: College Park, MD
|
Posted: Fri Feb 15, 2008 11:11 am Post subject: |
|
|
Hello nisha,
there already is a Driving-Directions Tutorial.
Which way made for m3-xxx SDK but should work for m5 (new SDK) with very slight changes.
Regards,
plusminus _________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
intellibitz Once Poster

Joined: 20 Feb 2008 Posts: 1 Location: Chennai, TamilNadu, India.
|
Posted: Wed Feb 20, 2008 3:46 pm Post subject: Re: Emulator error :) |
|
|
The following permission needs to be added to AndroidManifest, if you are using the latest m5 release.
<uses-permission android:name="android.permission.ACCESS_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_GPS"/>
After running, I'm getting the same error as venkat. Probably the GPS not supports anything other than SF area. I remember reading something along those lines in the docs.
| venkat wrote: | Dear +/-,
while i am running your code i am getting my Contacts displaying like below,
zzzzzzzz (not set km)
xyzzzzzw(not set km)
abcdeww(not set km)
it's not handling click event at all. it's displaying nothing. can you tell me what is may be the error ???
Thanks in advance,
regards,
venkat  |
_________________ http://intellibitz.com
We develop innovative solutions for mobile handsets, using Android. |
|
| Back to top |
|
 |
|
|
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.
|