[android-developers] multiple threads problem, possible memory leak
Hello there, I have a service from which I constantly call another service(lets call it B service), the problem is that in B service I have looper which processes two Runnables and when I stop B service, thread stays running, wouldn't die and when I call B service again I have two thread already in 5 min time I have about 30 threads, thread.interrupt doesn't seem to be working -- Regards, Rustam Kovhaev http://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: multiple threads problem, possible memory leak
scratch that, I am simply tired for today ^) //service on destroy public void onDestroy() { handler.getLooper().quit(); } 2010/12/13 Rustam Kovhaev rkovh...@gmail.com Hello there, I have a service from which I constantly call another service(lets call it B service), the problem is that in B service I have looper which processes two Runnables and when I stop B service, thread stays running, wouldn't die and when I call B service again I have two thread already in 5 min time I have about 30 threads, thread.interrupt doesn't seem to be working -- Regards, Rustam Kovhaev http://libertadtech.com -- Regards, Rustam Kovhaev http://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] listen for GPS updates for definite time
How do I listen for GPS location changes for lets say 5 minutes? and if It don't get a single gps fix it removes listener(removeUpdates()) -- Regards, Rustam Kovhaev http://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: listen for GPS updates for definite time
understood, thanks 2010/12/1 ip332 iprile...@gmail.com Rustam Location listener doesn't have timing constraint. Therefore you need to enable listener as usual and create an asynchronous thread or a timer or something else to check GPS status after a certain time. Below is a simple code which does checks GPS fix after 60 seconds. Best Igor // code fragment starts: private Handler mHandler = new Handler(); private void Start() { // invoke mGPScheckTask handler (see below) after 60 seconds interval mHandler.postDelayed(mGPScheckTask, 60 * 1000); } private void Stop() { mHandler.removeCallbacks(mGPScheckTask); } private Runnable mGPScheckTask = new Runnable() { public void run() { if( GPSfix ) // do something else // do something else // remove GPS listener here }; On Nov 30, 1:07 pm, Rustam Kovhaev rkovh...@gmail.com wrote: How do I listen for GPS location changes for lets say 5 minutes? and if It don't get a single gps fix it removes listener(removeUpdates()) -- Regards, Rustam Kovhaevhttp://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Rustam Kovhaev http://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: 3g or wifi connection without user interaction
Hi thanks, will check that regarding the first question, just want to make it absolutely clear lets consider following situation: on my Android cell I have 3g connection available(not connected, there is difference), if my App Service(background) needs Internet connection would it or would it not ask user's permission to connect to network? 2010/11/28 akkilis deepakverma.u...@gmail.com Rustam, To stop all the data connections while working on emulator, you need to configure it through DDMS perspective. Open it and go to Telephony Section, There you will find a drop down for the Data services, choose appropriate option for your requirement from home, roaming and denied. I dint get what you want to ask in the first query. If there is any open or public network available to your phone, it will connect to it automatically, provided you have not activated airplane mode. First you need to connect your phone to any working network, then only your app can also make any remote connection. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Rustam Kovhaev http://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] emulator sleep?
How do I put my Android emulator to sleep mode? -- Regards, Rustam Kovhaev http://libertadtech.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: 3g or wifi connection without user interaction
Hello there, I don't have an Android cell, so my questions could sound a bit dumb, still.. quick questions: 1. is it possible to initiate internet connection (3g/wifi) without asking user's permission, for.ex. get list of all wifi/3g apns or initiate search for open wifi and connect to network 2. why do I have working internet connection in my emulator when I activate Airplane mode? 3. when I disable all connections in emulator I still have internet connection, why is that? -- Regards, Rustam Kovhaev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] best layout for app, dynamic set of 2 rows which consist of icons and text
Hello, I am developing simple web app, It gets data from url, then parses it with htmlcleaner + xpath. That was easy part. Now I am trying to present data and populate my RelativeLayout with data and icons(I store icons in local resources) I am trying to populate my Activity with multiple sets, every set consist of 2 rows: 1st row imageview(icon) - listview(text)-imageview(icon) 2nd row listview(text) 1st row imageview(icon) - listview(text)-imageview(icon) 2nd row listview(text) ... and so on the question is: am I going in the right direction? is there any other(simpler) way to accomplish what I need? I am also not sure whether I can or can't do it all in main.xml, main.xml feels like describing static things to me Thank you all. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en