[android-beginners] Re: How to install Android on my PDA
Android is meant for cell phones, not PDAs. It also is not released yet and the manufacturer will have to put it on the phone (in most cases), you probably can't change your cell phone OS very easily on your own without knowing technicals with that specific phone and a lot programming. On Apr 8, 9:59 am, Jag Linux [EMAIL PROTECTED] wrote: Hi Iam looking for resource that will help to install Android on my PDA (Imate Kjam) ? can somebody give me a pointer for it ? or is it possible at all !!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: m5 not working
In the problems view I get an error on every line that a resource in R.java is, but only that. As far as the console view goes, I got nothing there and I just performed a clean on it. I tried running my program (even though it had errors just to see the console output) and the console gave me this: [2008-04-10 00:56:03 - adb] * daemon not running. starting it now * [2008-04-10 00:56:03 - DeviceMonitor] Connection attempts: 1 [2008-04-10 00:57:39 - DeviceMonitor] Adb connection Error:EOF [2008-04-10 00:57:39 - DeviceMonitor] Connection attempts: 1 [2008-04-10 00:57:39 - adb] * daemon not running. starting it now * Any idea what is going on that makes my R.java disappear and not come back? On Apr 7, 10:52 am, Xavier Ducrohet [EMAIL PROTECTED] wrote: Hi, I've never seen this behavior. If there was any errors in your project, the R.java file would not be updated but it certainly would not disappear during the build. Is there anything the android console view or in the Problems view? Xav On Sun, Apr 6, 2008 at 12:35 PM, wamoc [EMAIL PROTECTED] wrote: Ok, on the windows machine I didn't try anything with CVS, just to get m5to work. I downloaded eclipse and put the program files in C:/ program files/eclipse. I downloadedm5and put the folder in C:/. In eclipse I installed the plugins with the directions on the android site. I then restarted eclipse and went to properties and told it the location of them5version of the sdk. I created a new android project (to test things) and R.java was created no problems. I then modified a file (main.xml) and when eclipse rebuilt the project, R.java disappeared. I tried cleaning the project, going to android tools and fixing project properties, basically anything that people recommended to getm5to work on a project. Nothing would fix it. This is the exact same problem that my Ubuntu machine is having, it can create an initial R.java, but when it needs updating, it will no longer create it. I have tried the same steps on both of cleaning and whatnot to try to fix it. I am out of ideas on what to do. I know it is not just my computer/os, because 2 computers with different operating systems both having the same problems seems odd. It seems to me that them5release is pretty broken. On Apr 6, 12:42 pm, Dan U. [EMAIL PROTECTED] wrote: Wow. That sucks. My first inclination is that CVS is related. When you tried this on Windows, were you opening the project from a copy you got out of CVS? If it's not CVS, could you explain the exact steps you took to install everything on the Windows machine? On Apr 6, 10:08 am, wamoc [EMAIL PROTECTED] wrote: Ok, I installed eclipse, the plugins and the sdk on my windows machine, and the same problem is happening. Everything with this computer is a completely clean install for android and eclipse things. Any idea why this is happening? The first machine tried on was a laptop running Ubuntu Gutsy, eclipse 3.2 (did try upgrading to 3.3) originally running m3 but updated to runm5 Second machine tried on was a pc running Windows XP Pro, eclipse 3.3 runningm5(completely clean install, nothing for eclipse or android was ever on this comp). On Apr 6, 12:27 am, wamoc [EMAIL PROTECTED] wrote: Ok, I tried installing Eclipse Europa, and that didn't fix it. Tomorrow I will try to do this on my windows machine (shudder) and hope it works. On Apr 5, 10:19 pm, Dan U. [EMAIL PROTECTED] wrote: I think your development environment must be messed up. If I do a clean, R.java goes away, then regenerates immediately. Your eclipse version is ok according to the docs, but maybe you should try getting 3.3. It seems Ubuntu has been giving people problems, so it might be related. On Apr 5, 8:31 pm, wamoc [EMAIL PROTECTED] wrote: Ok, I tried copying everything over to a new project and it made an initial R.java. When I did a clean of the project, the R.java disappeared again. Why can'tm5seem to do anything with R.java except create an initial one? On Apr 5, 5:17 pm, Dan U. [EMAIL PROTECTED] wrote: I recall some other people having this problem and importing to a new project was a solution. Like you said, having it in cvs makes copying to a new project painful. Probably some config file somewhere doesn't get updated. I haven't seen a list of all the changes to various files between m3 andm5. If you can find one, you would know what files to look at. You could also consider creating two default projects, one in m3 and one inm5, then running a diff on them. On Apr 5, 2:26 pm, wamoc [EMAIL PROTECTED] wrote: Ok, I have figured out one thing, It wont generate the R.java for existing
[android-beginners] Re: Network connections in android
That wasn't quite what I was expecting. I'm not sure what you would use for rmi. I thought you were talking about connections to something like a webserver. On Apr 9, 11:30 pm, Analdin Judy [EMAIL PROTECTED] wrote: In java we use import java.rmi.Remote; import java.rmi.RemoteException; for network application na? What are the header files we have to use in android? Thanks judy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] eclipse android plugins's error
I have install the android's plugins,and face the problem: Unable to create the selected preference page. Reason: Plugin com.google.android.adt was unable to load the class com.google.android.adt.preferences.AndroidPreferencePage. and I also see my JDK version, it is JDK6... when I run eclipse with console,it is right,no error but I run eclipse directly,it has problem why? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Network connections in android
Is there any example in android document --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Is there a way to preserve a Bitmap in an icicle?
As Bitmap implements Parceable, try to use put(String, Parceable) regards, Raul On Thu, Apr 10, 2008 at 6:57 AM, J2MEJediMaster [EMAIL PROTECTED] wrote: I've got a basic sketch program working and I want to be able to preserve the screen's contents, which are in a Bitmap that the program modifies. Is there a way to store a Bitmap in an icicle? Or should I use another technique? ---Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to install Android on my PDA
thnx for the reply...and apologies for my ignorance tim jones wrote: On Thu, Apr 10, 2008 at 1:47 AM, wamoc [EMAIL PROTECTED] wrote: Android is meant for cell phones, not PDAs. It also is not released yet and the manufacturer will have to put it on the phone (in most cases), you probably can't change your cell phone OS very easily on your own without knowing technicals with that specific phone and a lot programming. I guess you have never heard of the Palm Treo? Palm PDA software on their phones. On Apr 8, 9:59 am, Jag Linux [EMAIL PROTECTED] wrote: Hi Iam looking for resource that will help to install Android on my PDA (Imate Kjam) ? can somebody give me a pointer for it ? or is it possible at all !!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Problem with socket connection to emulator console
I didn't say it, but yes I already have the emulator running before I run the connection test. I haven't installed any Activity/Service yet for handling the SMS message, but since the emulator is running, I would expect the socket connection to be made. --Ken On Apr 9, 10:43 pm, John P. [EMAIL PROTECTED] wrote: You need something on the other end accepting a connection request on port 5554. In your case, run the emulator first. On Apr 9, 9:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, Inhttp://groups.google.com/group/android-beginners/browse_thread/thread... Digit suggested: | you typically access the console by doing telnet localhost 5554, but the | cool thing is that you can also do that programmatically. what I mean is | that your program can do the following: | 1/ connect to TCP port 5554 on localhost | 2/ write the command sms send senderPhoneNumber textMessage followed | by a newline character (i.e. '\n') followed by quit\n | 3/ read any answer character from the connection (necessary on Windows to | avoid really weird Winsock-specific socket shutdown issues) until you | encounter an error (which means the connection was closed) I'm having trouble with Step 1/. I get Connection Refused when I try the following simple test: public class TestConsoleConnect { public static void main(String[] args){ InetAddress lh = null; Socket skt = null; try { lh = InetAddress.getLocalHost(); } catch (UnknownHostException uhe){ } try { skt = new Socket( lh, 5554); } catch (IOException ioe) { System.out.println(ioe); } finally { try { if (skt != null){ skt.close(); } } catch (Exception e){ } } } } I'm running on Mac OS X 10.5 with SDK m5-rc15_mac-x86. What am I missing or misunderstanding? Thanks in advance, Ken Bowen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Problem with socket connection to emulator console
Well, ok, some slightly odd behavior (should have checked this first): $ telnet localhost 5554 Trying ::1... telnet: connect to address ::1: Connection refused Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Android Console: type 'help' for a list of commands OK This seems to be repeatable; i.e., exactly this multiple retry each time I try the telnet... Is this common, the need to retry?? Thanks, Ken On Apr 10, 7:56 am, Digit [EMAIL PROTECTED] wrote: what about making the connection manually to see if the console is responding ? (yes, you can have several clients connected simultaneously to the same console) you're running your Java program example on OS X, not the emulator, right ? On Thu, Apr 10, 2008 at 1:28 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I didn't say it, but yes I already have the emulator running before I run the connection test. I haven't installed any Activity/Service yet for handling the SMS message, but since the emulator is running, I would expect the socket connection to be made. --Ken On Apr 9, 10:43 pm, John P. [EMAIL PROTECTED] wrote: You need something on the other end accepting a connection request on port 5554. In your case, run the emulator first. On Apr 9, 9:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, Inhttp:// groups.google.com/group/android-beginners/browse_thread/thread... Digit suggested: | you typically access the console by doing telnet localhost 5554, but the | cool thing is that you can also do that programmatically. what I mean is | that your program can do the following: | 1/ connect to TCP port 5554 on localhost | 2/ write the command sms send senderPhoneNumber textMessage followed | by a newline character (i.e. '\n') followed by quit\n | 3/ read any answer character from the connection (necessary on Windows to | avoid really weird Winsock-specific socket shutdown issues) until you | encounter an error (which means the connection was closed) I'm having trouble with Step 1/. I get Connection Refused when I try the following simple test: public class TestConsoleConnect { public static void main(String[] args){ InetAddress lh = null; Socket skt = null; try { lh = InetAddress.getLocalHost(); } catch (UnknownHostException uhe){ } try { skt = new Socket( lh, 5554); } catch (IOException ioe) { System.out.println(ioe); } finally { try { if (skt != null){ skt.close(); } } catch (Exception e){ } } } } I'm running on Mac OS X 10.5 with SDK m5-rc15_mac-x86. What am I missing or misunderstanding? Thanks in advance, Ken Bowen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Problem with socket connection to emulator console
it's because localhost is resolved to several addresses, i.e. ::1 is the IPv6 equivalent of 127.0.0.1 the emulator only listens on 127.0.0.1 (IPv4-only address). try telnet 127.0.0.1 5554 instead then On Thu, Apr 10, 2008 at 3:24 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, ok, some slightly odd behavior (should have checked this first): $ telnet localhost 5554 Trying ::1... telnet: connect to address ::1: Connection refused Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Android Console: type 'help' for a list of commands OK This seems to be repeatable; i.e., exactly this multiple retry each time I try the telnet... Is this common, the need to retry?? Thanks, Ken On Apr 10, 7:56 am, Digit [EMAIL PROTECTED] wrote: what about making the connection manually to see if the console is responding ? (yes, you can have several clients connected simultaneously to the same console) you're running your Java program example on OS X, not the emulator, right ? On Thu, Apr 10, 2008 at 1:28 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I didn't say it, but yes I already have the emulator running before I run the connection test. I haven't installed any Activity/Service yet for handling the SMS message, but since the emulator is running, I would expect the socket connection to be made. --Ken On Apr 9, 10:43 pm, John P. [EMAIL PROTECTED] wrote: You need something on the other end accepting a connection request on port 5554. In your case, run the emulator first. On Apr 9, 9:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, Inhttp:// groups.google.com/group/android-beginners/browse_thread/thread... Digit suggested: | you typically access the console by doing telnet localhost 5554, but the | cool thing is that you can also do that programmatically. what I mean is | that your program can do the following: | 1/ connect to TCP port 5554 on localhost | 2/ write the command sms send senderPhoneNumber textMessage followed | by a newline character (i.e. '\n') followed by quit\n | 3/ read any answer character from the connection (necessary on Windows to | avoid really weird Winsock-specific socket shutdown issues) until you | encounter an error (which means the connection was closed) I'm having trouble with Step 1/. I get Connection Refused when I try the following simple test: public class TestConsoleConnect { public static void main(String[] args){ InetAddress lh = null; Socket skt = null; try { lh = InetAddress.getLocalHost(); } catch (UnknownHostException uhe){ } try { skt = new Socket( lh, 5554); } catch (IOException ioe) { System.out.println(ioe); } finally { try { if (skt != null){ skt.close(); } } catch (Exception e){ } } } } I'm running on Mac OS X 10.5 with SDK m5-rc15_mac-x86. What am I missing or misunderstanding? Thanks in advance, Ken Bowen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Problem with socket connection to emulator console
Yes, I realized that after the last post. Revising the test to replace the lh= ... line by lh = InetAddress.getByName(localhost); produced an immediate connection. Sorry for the thrashing, Many thanks, Ken Bowen On Apr 10, 9:44 am, Digit [EMAIL PROTECTED] wrote: it's because localhost is resolved to several addresses, i.e. ::1 is the IPv6 equivalent of 127.0.0.1 the emulator only listens on 127.0.0.1 (IPv4-only address). try telnet 127.0.0.1 5554 instead then On Thu, Apr 10, 2008 at 3:24 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Well, ok, some slightly odd behavior (should have checked this first): $ telnet localhost 5554 Trying ::1... telnet: connect to address ::1: Connection refused Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Android Console: type 'help' for a list of commands OK This seems to be repeatable; i.e., exactly this multiple retry each time I try the telnet... Is this common, the need to retry?? Thanks, Ken On Apr 10, 7:56 am, Digit [EMAIL PROTECTED] wrote: what about making the connection manually to see if the console is responding ? (yes, you can have several clients connected simultaneously to the same console) you're running your Java program example on OS X, not the emulator, right ? On Thu, Apr 10, 2008 at 1:28 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I didn't say it, but yes I already have the emulator running before I run the connection test. I haven't installed any Activity/Service yet for handling the SMS message, but since the emulator is running, I would expect the socket connection to be made. --Ken On Apr 9, 10:43 pm, John P. [EMAIL PROTECTED] wrote: You need something on the other end accepting a connection request on port 5554. In your case, run the emulator first. On Apr 9, 9:16 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi All, Inhttp:// groups.google.com/group/android-beginners/browse_thread/thread... Digit suggested: | you typically access the console by doing telnet localhost 5554, but the | cool thing is that you can also do that programmatically. what I mean is | that your program can do the following: | 1/ connect to TCP port 5554 on localhost | 2/ write the command sms send senderPhoneNumber textMessage followed | by a newline character (i.e. '\n') followed by quit\n | 3/ read any answer character from the connection (necessary on Windows to | avoid really weird Winsock-specific socket shutdown issues) until you | encounter an error (which means the connection was closed) I'm having trouble with Step 1/. I get Connection Refused when I try the following simple test: public class TestConsoleConnect { public static void main(String[] args){ InetAddress lh = null; Socket skt = null; try { lh = InetAddress.getLocalHost(); } catch (UnknownHostException uhe){ } try { skt = new Socket( lh, 5554); } catch (IOException ioe) { System.out.println(ioe); } finally { try { if (skt != null){ skt.close(); } } catch (Exception e){ } } } } I'm running on Mac OS X 10.5 with SDK m5-rc15_mac-x86. What am I missing or misunderstanding? Thanks in advance, Ken Bowen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to install Android on my PDA
These newer phones are really noting, but PDAs with a different kind of WiFi They are using 900/1800/x frequencies instead of WiFi's 2.4 Ghz On Thu, Apr 10, 2008 at 3:43 AM, consoleart [EMAIL PROTECTED] wrote: thnx for the reply...and apologies for my ignorance tim jones wrote: On Thu, Apr 10, 2008 at 1:47 AM, wamoc [EMAIL PROTECTED] wrote: Android is meant for cell phones, not PDAs. It also is not released yet and the manufacturer will have to put it on the phone (in most cases), you probably can't change your cell phone OS very easily on your own without knowing technicals with that specific phone and a lot programming. I guess you have never heard of the Palm Treo? Palm PDA software on their phones. On Apr 8, 9:59 am, Jag Linux [EMAIL PROTECTED] wrote: Hi Iam looking for resource that will help to install Android on my PDA (Imate Kjam) ? can somebody give me a pointer for it ? or is it possible at all !!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] How to Create a Context
Hi Everyone, I'm trying to write a little app that passes information from one program running on the android framework to another. I figure the way to do this is to make an intent and bundle up the data I want into the Intent and broadcast it out with this: http://code.google.com/android/reference/android/content/Context.html#broadcastIntent(android.content.Intent) But I can't figure out how to make a context so I can't call this method! Any help would be appreciated. Thanks, Ray --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: How to Create a Context
Hi Ray, The Activity and Service classes are subclasses of Context. So you can refer to the Context object by using the this object reference in OnCreate() method of you Activity or Service. Also, you would use broadcastIntent() if you want an IntentReceiver in the other application to receive the data, but if you want an Activity in the other application to receive that data you can use startActivity()(with NEW_TASK_LAUNCH flag) instead. In both cases you will make an Intent object and put data in its Extras bundle. Thanks, Megha On Thu, Apr 10, 2008 at 11:52 AM, Ray [EMAIL PROTECTED] wrote: Hi Everyone, I'm trying to write a little app that passes information from one program running on the android framework to another. I figure the way to do this is to make an intent and bundle up the data I want into the Intent and broadcast it out with this: http://code.google.com/android/reference/android/content/Context.html#broadcastIntent(android.content.Intent)http://code.google.com/android/reference/android/content/Context.html#broadcastIntent%28android.content.Intent%29 But I can't figure out how to make a context so I can't call this method! Any help would be appreciated. Thanks, Ray --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Unpleasant interaction between timer and updating a map overlay
Hi All, One of the methods in my Android App is named locationSubmit(). It: -- obtains gps coords, -- sends the coords to a (Tomcat) server with a web services call, -- receives back a collection of points in the return from the server, -- plots these points on a map, with a recentering of the map This all works fine when I drive it with clicks from the keyboard (I happen to use Z) -- I can see the appropriate updates to the points with each Z click. However, I now want to run locationSubmit() periodically under the control of a TimerTask. When I do, the mapping process appears to freeze although everything else seems to keep going. Here is the simple timer task and startup (I run it with samplingPeriod=15000; ie, 15 seconds): private void startTimer(long samplingPeriod) { _lbsTimer = new Timer(false); _lbsTimer.schedule(new LBSUpdateTask(), new Date(), samplingPeriod); } protected class LBSUpdateTask extends TimerTask { protected LBSUpdateTask() { } public void run() { locationSubmit(); } } The first execution of locationSubmit() under timer control almost works correctly: The points are plotted, but the map is not recentered. And from this point on, the map does not change at all, while the timer keeps functioning. However, from observing the server, I can see that the correct calls are arriving at the server from the Android client, and the correct returns are being sent back. Also, if I run my Android app under the debugger, I can see that it is receiving the values from the server, and stepping through the code as exepected, but not updating the overlay like it does when I drive it with keyboard clicks. The basic outline of locationSubmit() is this: private void locationSubmit() { try{ URL url = new URL(getNextLocnURL()); URLConnection urlconn = url.openConnection(); Document doc = null; try{ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); DocumentBuilder db = dbf.newDocumentBuilder(); urlconn.getInputStream(); InputStream istream = urlconn.getInputStream(); doc = db.parse(istream); // extract info from doc and add it to an instance variable // visible to _mapView below: _mapView.invalidate(); } catch (Exception e){ } } The value of MapView _mapView is set in onCreate to _mapView = new MapView(this); There is a simple class MyAppOverlay which extends Overlay, and plots the points using draw(...) when _mapView is invalidated. Have I missed something here? Thanks in advance, Ken Bowen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] About com.google.android.gtalkservice.
Hi I got error in import com.google.android.gtalkservice; Can anybody please tell me what is the wrong in the coding? Thanks judy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---