[android-developers] ZIpFile Extraction Problem
Hi All, I am trying to unzip a file using java.util.zip. For this, I follow the following steps:- 1. Download the zip file. 2. Extract the zip file. The problem is very unusual; the downloaded file is sometimes extracted successfully but the same file gives “End of Central Directory Signature” not found exception when I run the program again at another time to download and extract. Let me assure u that each run of the program is “first run” i.e. before each run I uninstall the executable and redeploy it and make sure that all directory paths are clear and each time I run it from the most initial state. However, I still face this exception sometime when I run it from the beginning. In addition, the downloaded zip file that gives exception while extracting through code is always extracted successfully through WinZip. Please help! Here is my code for extracting the file http://pastie.org/1337599 Thanx, Hassan Imtiaz -- 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] Activity Stack Problem
Hi All, When i leave my app after pressing home button and then re launch it from menus it behaves in a strange way. Sometimes it launches the same activity on which i pressed home button. But sometimes it launches the first activity of my app. One reason for this could be that whenever system has memory shortage it clears any activities existing in background. But the strange thing is if i press back button from first activity it takes me back to the same activity on which i pressed home button and all other previous activities are also there(like if i press back button again previous activities also exist.) I haven't set any launching mode for any activity in my app(like single instance etc). What i don't need is that previous activities load on pressing back button on first activity. pleases help... Regards, Hassan Imtiaz -- 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] Unable to update gui
Hi, I have developed a simple application in which I connect to dark star server through android client. In my client I have implemented SimpleClientListener. When I try to set text of a textview in receivedMessage called by the server it throws an exception android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. I handled this issue by updating my textviews through handlers. Is it the recommended way? Any suggestions? Regards, Hassan Imtiaz -- 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: Start and Stop music on application launch and stop
Thanks Tobias, Actually in my activities there is an activity that i am using through jar file and when i press home button of device at that particular activity, application is paused but there is no way i can override the onpause() function of that activity to stop music.So how can i stop music in this case? Best Regards, Hassan Imtiaz On Tue, Jan 5, 2010 at 2:38 PM, tobias429 ecker...@gmx.de wrote: Hi Hassan, You can use the onPause() and onResume() functions for this. Just override the original functions and place the code to start your sound in onResume() and the code to stop your sound in onPause(). In case you have several activities that can be independently started and stopped, I'd use a static class with a counter of how many activities are active right now. Every time an activity executes onResume(), increase the counter by one, every time onPause() is called, decrease it by one. You can then stop your sounds in onPause() in case the counter is set to zero. Ditto for onResume(), where you only need to start your sound in case that static counter was zero beforehand. Haven't tried this though, just an idea. Best regards, Tobias On Jan 5, 7:14 am, Hassan Imtiaz hassan.imt...@cprods.com wrote: Hi, In my application i have several activities and i want to start background music whenever my *Application* is launched and stop music whenever *Application* is paused or stopped. Any help?. Regards, Hassan Imtiaz -- 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 -- 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] Start and Stop music on application launch and stop
Hi, In my application i have several activities and i want to start background music whenever my *Application* is launched and stop music whenever *Application* is paused or stopped. Any help?. Regards, Hassan Imtiaz -- 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] Problem Using Jar File
Hi All, i am facing a problem in using jar file.I have created a jar file and i am trying to use it in another project.I also copy the xml files from res/layout folder of that project whose jar file is created to the res/layout folder of the project in which i am using jar file.I have also listed all the activites of jar in manifest file of that project. But when i call an activity that is inside jar file it loads the wrong xml file.I mean if inside an activity i have setContentview (R.layout.test1) but it loads another file instead of test1. Any Help?? Regards, Hassan Imtiaz --~--~-~--~~~---~--~~ 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: Problem Using Jar File
Hi Mark, Thanks for your reply.Right now i am not using the R file of that project whose jar file is created.Jar file does not contains R files of that project.So R.layout and R.id's are created in the client project where i am using jar file. Regards Hassan Imtiaz --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---