[android-beginners] Android app hangs, debug mode does not help, just hangs
?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.org.mcruiseon.client android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.WelcomeScreen android:label=@string/app_name uses-permission android:name=android.permission.INTERNET / intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / uses-permission android:name=android.permission.INTERNET/uses-permission uses-permission android:name=android.permission.READ_PHONE_STATE/uses-permission /manifest I am reading the phone number and other phone properties to send over a socket using (sample code below) try{ outputStream = clientSocket.getOutputStream() ; objectOutputStream = new ObjectOutputStream(outputStream); } catch (IOException e){ e.printStackTrace(); } Server Code as this.inClientSocket = inClientSocket ; try { inputObject = new ObjectInputStream(this.inClientSocket.getInputStream()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return ; } Questions - I am running the client in debug mode. Why isn't the debugger showing me where the problem is ? - I put a breakpoint on the first time of the client code, still the client hangs without the debugger reaching the breakpoint Can someone advice me on what I am doing wrong. Dude 4m MConDev --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Android app hangs, debug mode does not help, just hangs
I had associated the wrong application on the device with the debugger.Previously I had com.mcruiseon.WelcomeScreen. I modified the code to com.org.mcruiseon.client.WelcomeScreen. But the debugger on the emulator was still debugging com.mcruiseon. Fixed that. But now I get the below. [2009-07-03 19:33:59 - mCruiseOnClient] Android Launch! [2009-07-03 19:33:59 - mCruiseOnClient] adb is running normally. [2009-07-03 19:33:59 - mCruiseOnClient] Performing com.org.mcruiseon.client.WelcomeScreen activity launch [2009-07-03 19:33:59 - mCruiseOnClient] Automatic Target Mode: Preferred AVD 'MyAVD' is not available. Launching new emulator. [2009-07-03 19:33:59 - mCruiseOnClient] Launching a new emulator with Virtual Device 'MyAVD' [2009-07-03 19:34:19 - mCruiseOnClient] New emulator found: emulator-5554 [2009-07-03 19:34:19 - mCruiseOnClient] Waiting for HOME ('android.process.acore') to be launched... [2009-07-03 19:35:55 - mCruiseOnClient] emulator-5554 disconnected! Cancelling 'com.org.mcruiseon.client.WelcomeScreen activity launch'! Please help On Fri, Jul 3, 2009 at 4:53 PM, MCON Dev mcon...@gmail.com wrote: ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.org.mcruiseon.client android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/app_name activity android:name=.WelcomeScreen android:label=@string/app_name uses-permission android:name=android.permission.INTERNET / intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=3 / uses-permission android:name=android.permission.INTERNET/uses-permission uses-permission android:name=android.permission.READ_PHONE_STATE/uses-permission /manifest I am reading the phone number and other phone properties to send over a socket using (sample code below) try{ outputStream = clientSocket.getOutputStream() ; objectOutputStream = new ObjectOutputStream(outputStream); } catch (IOException e){ e.printStackTrace(); } Server Code as this.inClientSocket = inClientSocket ; try { inputObject = new ObjectInputStream(this.inClientSocket.getInputStream()); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); return ; } Questions - I am running the client in debug mode. Why isn't the debugger showing me where the problem is ? - I put a breakpoint on the first time of the client code, still the client hangs without the debugger reaching the breakpoint Can someone advice me on what I am doing wrong. Dude 4m MConDev --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: VMWare Image of the Android Emulator
VMware emulates X86. Android emulator emulates arm. So.. no. You could make it worse by emulating a linux system running the android emulator though, that'd be funny. On Fri, Jul 3, 2009 at 10:18 AM, MCON Devmcon...@gmail.com wrote: Is it possible to create a vmware image of the emulator ? After all its a operating system image after all. If yes, it would prove very fruitful. Currently the emulator takes on a lot of processing power of the development machine. Making the development really painful experience. The more complex the product becomes the more difficult the development. Thanks Siddharth --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] getSystemService(Context.SENSOR_SERVICE) hangs emulator
Hi, The emulator seems to hang whenever I call getSystemService (Context.SENSOR_SERVICE). I've tried it with SDK 1,1 and SDK 1.5 but I always get the same issue. Any idea how to fix this? Thanks, Jean --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
jstoezel wrote: The emulator seems to hang whenever I call getSystemService (Context.SENSOR_SERVICE). I've tried it with SDK 1,1 and SDK 1.5 but I always get the same issue. Any idea how to fix this? For the time being, only work with sensors on actual hardware, not the emulator: http://code.google.com/p/android/issues/detail?id=2566 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
Thanks for the quick reply. I thought it was possible to work with sensors on the emulator, as it looks like there's even a simulator for them (the openintents simulator)... How do they get to use the sensors on the emulator? On 3-Jul-09, at 5:43 PM, Mark Murphy wrote: jstoezel wrote: The emulator seems to hang whenever I call getSystemService (Context.SENSOR_SERVICE). I've tried it with SDK 1,1 and SDK 1.5 but I always get the same issue. Any idea how to fix this? For the time being, only work with sensors on actual hardware, not the emulator: http://code.google.com/p/android/issues/detail?id=2566 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
I thought it was possible to work with sensors on the emulator, as it looks like there's even a simulator for them (the openintents simulator)... How do they get to use the sensors on the emulator? Back in Android 1.1 and previous, you could get the system service and things worked, insofar as you would not get any readings without OpenIntents' simulator. For whatever reason, Android 1.5's emulator no longer handles sensors at all. Unless a 1.5r3 is forthcoming, I suspect we will need to wait for the next major Android release (1.6? 2.0?). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
Hi Mark, Are you saying that it should work with SDK 1.1? getSystemService hangs for both SDK 1.1 and 1.5 on my machine (Mac OS X). Thanks, Jean On 3-Jul-09, at 6:25 PM, Mark Murphy wrote: I thought it was possible to work with sensors on the emulator, as it looks like there's even a simulator for them (the openintents simulator)... How do they get to use the sensors on the emulator? Back in Android 1.1 and previous, you could get the system service and things worked, insofar as you would not get any readings without OpenIntents' simulator. For whatever reason, Android 1.5's emulator no longer handles sensors at all. Unless a 1.5r3 is forthcoming, I suspect we will need to wait for the next major Android release (1.6? 2.0?). -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
Are you saying that it should work with SDK 1.1? getSystemService hangs for both SDK 1.1 and 1.5 on my machine (Mac OS X). Is it real Android 1.1 or Android 1.1 as supplied by the 1.5 SDK? I'm fairly certain you could get the sensor system service in true Android 1.1. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
I'm using SDK 1.1, as provided with SDK 1.5. Can I still get the true SDK 1.1? On 3-Jul-09, at 6:42 PM, Mark Murphy wrote: Are you saying that it should work with SDK 1.1? getSystemService hangs for both SDK 1.1 and 1.5 on my machine (Mac OS X). Is it real Android 1.1 or Android 1.1 as supplied by the 1.5 SDK? I'm fairly certain you could get the sensor system service in true Android 1.1. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: getSystemService(Context.SENSOR_SERVICE) hangs emulator
I'm using SDK 1.1, as provided with SDK 1.5. Given your symptoms, I am guessing that perhaps the sensor problem may stem from something in the qemu environment that the Android emulator runs in. Either that, or 1.1 was also broken, and I am mis-remembering. That's happened before (the mis-remembering part)... Can I still get the true SDK 1.1? http://developer.android.com/sdk/1.1_r1/index.html Just be sure that you get your hands on some hardware for real-world testing before you try shipping a product. Not only is there the Android version difference, but the sensor simulator still only gets you so far. There is no substitute for seeing how sensors behave in the real world on a real device. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Re: Garbage Collection of Threads
Thanks for all your help. I've finally figured out the discrepancy. Using the following code, I ran it through the debugger (in Eclipse, WinXP, emulator) and then ran it just through the emulator - I get different results. The debugger shows TestThread Running while the non-debugger version shows TestThread FinaIizing. I believe the debugger holds a reference to the TestThread which prevents it from getting garbage collected. Of course, as you said this is all technically valid since System.gc() is not guaranteed to do anything, but it's nice to know it won't have any memory leaks on the final version. package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ TextView mTV; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mTV = new TextView(this); mTV.setText(Hello, Android); setContentView(mTV); TestThread t = new TestThread(); t.start(); try { t.join(); } catch (InterruptedException e) { e.printStackTrace(); } t = null; System.gc(); } protected void finalize() throws Throwable { super.finalize(); } class TestThread extends Thread { @Override public void run() { mTV.setText(TestThread Running); } protected void finalize() throws Throwable { mTV.setText(TestThread Finalizing); super.finalize(); } } } --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---
[android-beginners] Porting Android code to Symbian
I find it a interesting proposition to port applications from Android to Symbian and improve a mobile app's popularity and usage. I am sure that I will find multiple results using a google search on this topic. But any recommendations from where I should start ? Sid 4m mConDev --~--~-~--~~~---~--~~ 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 android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~--~~~~--~~--~--~---