| Author |
Message |
Marchu Junior Developer

Joined: 27 Sep 2008 Posts: 19 Location: Netherlands
|
Posted: Sun Sep 28, 2008 7:43 pm Post subject: Source for 1.0 SDK |
|
|
After some hard strugling with the code, i managed to get it work with the 1.0 SDK.
There are so many changes with the 1.0 SDK, and so less demo's and examples, that the most work was trial and error . (for almost 24 hours)
I just started with figuring out Android, so it was a nice learning curve
There are many changes in the code but not in the main performance, and i have left (offcourse) the comments from plusminus in place.
This to give a idea what the code is doing.
The most changes are syntax changes, eq. zoomTo is now setZoom, menu.Item is now MenuItem, etc. (to give a idea)
Also changes to calculate the pixels on screen, from a Geopoint is totaly changed.
In the old demo they use CalculatePixels, what was a special thing for this. Now this is done by:
| Java: |
mapView.getProjection().toPixels(point,myScreenCoords);
|
Youre own location will now also be always in the center if you zoom in and out.
There's are more new things with 1.0, but i think the most is clear after seeing the code.
p.s. Don't forget for the first time, to set youre location thruw geo fix (telnet)
For the new ones on how to do that.
- Open a console
- type: telnet localhost 5554
(this connects to the simulator on port 5554, to simulate things)
- type: geo fix -121.45356 46.51119 4392
(or any other location with a longitude latitude height)
tip to get your own geo location:
http://www.mygeoposition.com/
Thats it, happy programming
Cheers
| Description: |
|
 Download |
| Filename: |
FriendFinder_v10SDK.rar |
| Filesize: |
65.31 KB |
| Downloaded: |
480 Time(s) |
Last edited by Marchu on Mon Oct 20, 2008 12:10 am; edited 1 time in total |
|
| Back to top |
|
 |
ninor Moderator


Joined: 14 Aug 2008 Posts: 179 Location: Barcelona, Spain
|
Posted: Sun Sep 28, 2008 8:58 pm Post subject: |
|
|
Good job, Marchu!
Thank you very much for taking your time updating this example
|
|
| Back to top |
|
 |
plusminus Site Admin


Joined: 14 Nov 2007 Posts: 2624 Location: College Park, MD
|
Posted: Mon Sep 29, 2008 2:00 am Post subject: |
|
|
Really nice Marchu. I've put link to your post to the beginning of this topic.
Best Regards,
plusminus
_________________
Download my apps  Please remember, that this board is give & take 
| Android Development Community / Tutorials |
|
| Back to top |
|
 |
William Wen Freshman

Joined: 23 Sep 2008 Posts: 9
|
Posted: Sat Oct 11, 2008 5:24 pm Post subject: |
|
|
Really appreciate your job, Marchu!
And the following permissions have been removed in SDK1.0:
| XML: | <uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION"
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_CELL_ID" /> |
_________________ William Wen |
|
| Back to top |
|
 |
eviesun Once Poster

Joined: 18 Oct 2008 Posts: 1
|
Posted: Sat Oct 18, 2008 5:32 am Post subject: Re: Source for 1.0 SDK |
|
|
Hi, Machu,
I downloaded your code. but after i typed the FriendFinder icon on the main screen, it has the following run time exception. Seems it is rooted from the Android SDK.
The emulator says ".friendfinder has stopped unexpectedly...."
I am totally fresh to Android.. Can u help me to figure out what the problem is? thanks a lot.
| Description: |
|
| Filesize: |
32.83 KB |
| Viewed: |
1554 Time(s) |

|
|
|
| Back to top |
|
 |
Paranoid Freshman

Joined: 19 Oct 2008 Posts: 7
|
Posted: Sun Oct 19, 2008 5:12 pm Post subject: |
|
|
I'm getting the same error
|
|
| Back to top |
|
 |
Bruce.lntu Developer


Joined: 03 Jan 2008 Posts: 36
|
Posted: Wed Oct 22, 2008 9:22 am Post subject: |
|
|
Hi Marchu,
I downloaded the codes and it worked, but only worked as below:
My question is: why can not find the menu of adding contacts? or any other fountions?
the whole running showed no error. this really confused me. pls tell us where the problems happend. thank you.
regards
Bruce
| Description: |
| my location is only displayed in the red ellipse. |
|
| Filesize: |
64.3 KB |
| Viewed: |
1399 Time(s) |

|
| Description: |
| when the map display, then press the MENU |
|
| Filesize: |
22.92 KB |
| Viewed: |
1399 Time(s) |

|
| Description: |
|
| Filesize: |
9.93 KB |
| Viewed: |
1399 Time(s) |

|
|
|
| Back to top |
|
 |
Bruce.lntu Developer


Joined: 03 Jan 2008 Posts: 36
|
Posted: Thu Oct 23, 2008 9:30 am Post subject: |
|
|
| after adding contacts following the FriendFinder 1, still can not find the friend's location with only "Me"and round dot. somebody tell us why?
|
|
| Back to top |
|
 |
Bruce.lntu Developer


Joined: 03 Jan 2008 Posts: 36
|
Posted: Thu Oct 23, 2008 12:26 pm Post subject: |
|
|
| plusminus wrote: | 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:
| Java: | @Override
public boolean onCreateOptionsMenu(Menu menu) {
boolean supRetVal = super.onCreateOptionsMenu(menu);
menu.add(0, 0, getString(R.string.main_menu_open_map));
return supRetVal;
}
@Override
public boolean onOptionsItemSelected(Menu.Item item) {
switch (item.getId()) {
case 0:
startSubActivity(new Intent(this, FriendFinderMap.class), 0);
return true;
}
return false;
} |
You will at least see yourself on the Map
Please tell us if that fixed it
Regards,
plusminus
Regards,
plusminus |
I also got the same problem as the screem shot are below:
please plusminus tell us where is the real problem. thank you ,it really cost me so much time looking for the error.
| Description: |
|
| Filesize: |
19.5 KB |
| Viewed: |
1354 Time(s) |

|
| Description: |
|
| Filesize: |
15.08 KB |
| Viewed: |
1354 Time(s) |

|
| Description: |
| "me" is in the red circle |
|
| Filesize: |
24.83 KB |
| Viewed: |
1354 Time(s) |

|
|
|
| Back to top |
|
 |
wongstar.iac Junior Developer

Joined: 23 Oct 2008 Posts: 10
|
Posted: Tue Oct 28, 2008 4:04 am Post subject: Re: The Friend Finder - MapActivity using GPS - FULL SOURCE |
|
|
when I run sample ap about maps there is a error:
Does anyone understand the error "Couldn't get connection factory
client" ? I have the same error in my app.
Thanks for help.
|
|
| Back to top |
|
 |
java.padawan Freshman

Joined: 27 Oct 2008 Posts: 4
|
Posted: Tue Oct 28, 2008 11:09 am Post subject: Re: The Friend Finder - MapActivity using GPS - FULL SOURCE |
|
|
| wongstar.iac wrote: | when I run sample ap about maps there is a error:
Does anyone understand the error "Couldn't get connection factory
client" ? I have the same error in my app.
Thanks for help. |
try this.
http://www.androidph.com/2008/10/android-map-viewer.html
|
|
| Back to top |
|
 |
mschot Freshman

Joined: 29 Oct 2008 Posts: 3
|
Posted: Wed Oct 29, 2008 9:56 pm Post subject: problem with override |
|
|
Hi Everyone,
Tried compiling the code but eclipse cant compile as there are errors it seems that the methods in the myLocationListener the cant override the LocationListener methods as eclipse giver the following error(s):
-The method onProviderDisabled(String) of type FriendFinder.myLocationListener must override a superclass method
- implements android.location.LocationListener.onProviderDisabled
I'm kind of a newbie at android and would appreciate any help.
thanks in advance.
mschot
|
|
| Back to top |
|
 |
mschot Freshman

Joined: 29 Oct 2008 Posts: 3
|
Posted: Sun Nov 02, 2008 6:03 pm Post subject: Re: The Friend Finder - MapActivity using GPS - FULL SOURCE |
|
|
managed to compile it now by commenting the overrides...
| wongstar.iac wrote: | when I run sample ap about maps there is a error:
Does anyone understand the error "Couldn't get connection factory
client" ? I have the same error in my app.
Thanks for help. |
go to line 214 in FriendFinderMap.java and replace "key?" with your api key in:
| Java: | this.myMapView = new MapView(this, "key?"); |
|
|
| Back to top |
|
 |
wongstar.iac Junior Developer

Joined: 23 Oct 2008 Posts: 10
|
Posted: Mon Nov 03, 2008 10:20 am Post subject: |
|
|
| Bruce.lntu wrote: | Hi Marchu,
I downloaded the codes and it worked, but only worked as below:
My question is: why can not find the menu of adding contacts? or any other fountions?
the whole running showed no error. this really confused me. pls tell us where the problems happend. thank you.
regards
Bruce |
hi, I have the same picture with you ? what's wrong?
I also havn't the menu of adding contacts! help me !
thank you!
|
|
| Back to top |
|
 |
wongstar.iac Junior Developer

Joined: 23 Oct 2008 Posts: 10
|
Posted: Mon Nov 03, 2008 10:23 am Post subject: Re: The Friend Finder - MapActivity using GPS - FULL SOURCE |
|
|
| mschot wrote: | managed to compile it now by commenting the overrides...
| wongstar.iac wrote: | when I run sample ap about maps there is a error:
Does anyone understand the error "Couldn't get connection factory
client" ? I have the same error in my app.
Thanks for help. |
go to line 214 in FriendFinderMap.java and replace "key?" with your api key in:
| Java: | this.myMapView = new MapView(this, "key?"); |
|
thank you ,the error is my apikey is wrong! thank you now I can run ! but there are also have some question!
first , I havn't a menu contact
|
|
| Back to top |
|
 |
|