[android-developers] CheckinTask time correction
Now I found one very curious issue, If I can access internet (WIFI, 3G), and change date/time 2010 year to 2011 year, after while, system automaticlly update my date/time 2011 to 2010 year. In fact I had disable the automatic update date/time function in setting. following is my log, GMS had done this, why? how to remove this function? Help, Thanks, Tom 09-13 05:23:18.752 1508 1645 I CheckinTask: Sending checkin request (312 bytes) 09-13 05:23:19.548 1508 1645 E CheckinTask: SSL error, attempting time correction: javax.net.ssl.SSLException: Not trusted server certificate 09-13 05:23:20.228 1508 1645 W CheckinTask: Setting time from 1315891400235 to 1284355400313 09-13 05:23:20.236 1325 1331 D SystemClock: Setting time of day to sec=1284355400 -- 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: Monkey usage with Scripts/Network Control not working
Monkey network control working correctly. Must be careful about scaling co-ordinates while using it. I hope this post helps others when they have problems. Cheers, Earlence On Sep 12, 11:21 pm, Tez earlencefe...@gmail.com wrote: count= number of events speed= in ms start data DispatchPointer(long downTime, long eventTime, int action, float x, float y, float pressure, float size, int metaState, float xPrecision, float yPrecision, int device, int edgeFlags) DispatchTrackball same as DispatchPointer DispatchKey(long downTime, long eventTime, int action, int code, int repeat, int metaState, int device, int scancode) DispatchFlip(boolean keyboardOpen) DispatchPress(int keyCode) LaunchActivity(String pkg_name, String cl_name) UserWait(long sleeptime) LongPress() This is the format. You should be careful to ensure that the co-ordinates are correct. What you specify here are raw co-ords i.e before any window adjustments etc take place. You must take this into account while calculating co-ords. I am yet to try the network control - Lets see what happens. Cheers, Earlence On Sep 12, 10:20 pm, Tez earlencefe...@gmail.com wrote: An update: I was using an incorrect script file. The correct version is as described here http://android.git.kernel.org/?p=platform/development.git;a=blob;f=cm... I am trying to figure out what device code I need to use. Events are being sent, but I cannot see output. Will posts here once I get things working. (I think the Network Control/scriptfile docs are confusing) Cheers, Earlence On Sep 12, 9:34 pm, Tez earlencefe...@gmail.com wrote: Hi, I am trying to do 2 things with monkey 1. Execute a script with a command like adb shell monkey -p MY_PACKAGE --setup scriptfile -f /sdcard/ mon_script1.txt 1 where mon_script.txt contains a few touch commands. After I execute this, I see nothing happening on the screen. It even does not give me the Number of events injected message. I have verified that my touch co-ordinates fall over actual UI elements. This is the script file I am using tap 79 29 tap 100 100 tap 200 200 tap 300 300 quit 2. Execute Monkey Network control to type commands individually. I start up monkey to listen to a port and use PuTTY to send commands. I get OK return messages, but nothing happens on the screen. Whenever I use monkey in the random mode, I see interaction on the screen. But I need to get one of the above 2 methods to work. I have seen the sources of monkey and nothing seems to be wrong. Has anyone used monkey in the above described way? If so, please tell me what I am doing wrong. Cheers, Earlence -- 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: Edittext Cursor and Highlight Problem
Does anyone have any solutions to this at all? On Sep 2, 12:56 am, SurtaX garylo@gmail.com wrote: I am trying to implement a textview which has select text/copy and paste functionality. I tried to do this by making an Edittext with the following properties. I currently have the following Edittext: EditText style=?android:attr/textViewStyle android:editable=false android:background=@null android:textColor=@null android:id=@+id/textbox/ I want users to be able to highlight the text with long click -- select text. This works fine with the above code and the highlights of selected text come out fine. However I do not want the cursor to always be flashing. I successfully get rid of the cursor by using: textBox.setCursorVisible(false); However with this change whenever a user long clicks and hits select text, the highlighted text no longer has any color over it. I have tried to change the color of the highligthed text to textBox.setHighlightColor(android.graphics.Color.RED); But this does not seem to have any effect. Any suggestions will be greatly appreciated! -- 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] ContentObserver not working
Hi All, I want to write a code that will notify me whenever my database changes. For example I write a code that extends ContentObserver class and overrieds onChange() method. and in registration time i am giving url Contacts.People.CONTENT_URI. so i want when some modify contacts onChange() method should be called. But its not working. Please help me for the same. Thanks, Sohan Badaya -- 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] CheckinTask time correction
Er... turn off the automatic update date/time option, if that is what you want. Not sure what else you are looking for about how to remove it. As for why this is done... generally, as users, we find it nice that our device knows the time without us doing anything, and since with a network connection the time is available, well why not? On Sun, Sep 12, 2010 at 11:13 PM, tom gxiao...@sohu.com wrote: Now I found one very curious issue, If I can access internet (WIFI, 3G), and change date/time 2010 year to 2011 year, after while, system automaticlly update my date/time 2011 to 2010 year. In fact I had disable the automatic update date/time function in setting. following is my log, GMS had done this, why? how to remove this function? Help, Thanks, Tom 09-13 05:23:18.752 1508 1645 I CheckinTask: Sending checkin request (312 bytes) 09-13 05:23:19.548 1508 1645 E CheckinTask: SSL error, attempting time correction: javax.net.ssl.SSLException: Not trusted server certificate 09-13 05:23:20.228 1508 1645 W CheckinTask: Setting time from 1315891400235 to 1284355400313 09-13 05:23:20.236 1325 1331 D SystemClock: Setting time of day to sec=1284355400 -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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] Question on Intents?
I have the a scenario where number of Activites are invoked: Activity A -- Activity B -- Browser Activity -- Activity C... By Browser Activity I mean, Activity B will do the following: String url = http://example.com;; startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); On Activity C , when user clicks the back button, it always returns to the Browser Activity. I do not want this to happen... I understand that each time one Activity calls another, the caller activity goes onto a stack?? Is it possible to restrict it going onto the stack, so that when user press back button on Activity C, it goes to Activity B, skipping the Browser Activity? Please help!!! Regards, Arpit -- 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] Question on Intents?
You probably can't avoid this. The browser is somewhat special in its implementation, and doesn't even go on your back stack. (It is singleTask.) One thing you could try, if activity B and C are your own, if you give them the same taskAffinity then you could maybe set it up so the launch of C causes or task with A/B to come to the foreground and place C on top. Or just not try to stick the browser in the middle of your task like that, and instead implement your own activity to display a web page with WebView. On Sun, Sep 12, 2010 at 11:51 PM, Arpit robin.ca...@gmail.com wrote: I have the a scenario where number of Activites are invoked: Activity A -- Activity B -- Browser Activity -- Activity C... By Browser Activity I mean, Activity B will do the following: String url = http://example.com;; startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); On Activity C , when user clicks the back button, it always returns to the Browser Activity. I do not want this to happen... I understand that each time one Activity calls another, the caller activity goes onto a stack?? Is it possible to restrict it going onto the stack, so that when user press back button on Activity C, it goes to Activity B, skipping the Browser Activity? Please help!!! Regards, Arpit -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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: Question on Intents?
Hi Arpit, Check lainch modes of an activity (http://developer.android.com/guide/ topics/manifest/activity-element.html#lmode) and the flag FLAG_ACTIVITY_NEW_TASK Thanks, AJ On Sep 13, 11:51 am, Arpit robin.ca...@gmail.com wrote: I have the a scenario where number of Activites are invoked: Activity A -- Activity B -- Browser Activity -- Activity C... By Browser Activity I mean, Activity B will do the following: String url = http://example.com;; startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); On Activity C , when user clicks the back button, it always returns to the Browser Activity. I do not want this to happen... I understand that each time one Activity calls another, the caller activity goes onto a stack?? Is it possible to restrict it going onto the stack, so that when user press back button on Activity C, it goes to Activity B, skipping the Browser Activity? Please help!!! Regards, Arpit -- 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] Every few hours Eclipse + ADT runs out of resources...
in ADT 0.9.8, we've fixed a (big) memory leak happening in the layout editor. I suggest you update (0.9.8 was released on Wednesday). Let me know if this still happens. Xav On Sun, Sep 12, 2010 at 2:38 PM, mmo mmo...@gmail.com wrote: When I am developing for Android and repeatedly running and/or debugging an Android app in the emulator then about every two hours or so I get an Out-of-memory exception, occasionally also an out-of - resources- or out-of-GWT-handles exception. At that point one can only stop and restart eclipse. Apparently the ADK must be doing something wrong, because I have been developing with Eclipse now for 5+ years and I normally never see this. ADT is a really the exception here. Is there any setting or patch that helps top avoid this? I have already given it more heap space (750M) to stretch the time between these hickups a bit, but that approach isn't really sustainable. This is using Eclipse 3.5 (Galileo) and the Android SDK r06 running a FroYo AVD. Michael -- 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 -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- 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: How to reduce padding between cells in TableLayout
Anyone? On Sep 12, 10:43 pm, William Ferguson william.ferguson...@gmail.com wrote: I have a 3*3 TableLayout that contains buttons. But I cannot seem to remove the spacing between the buttons in the Table. Setting pading to zero for the buttons has no effect. Setting padding and layout_margin to zero for the TableRow has no effect. Setting layout_margin for the TableLayout has no effect. Any idea on how I can alter/remove/reduce the spacing between the cells? William -- 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: any tool in android to find memory leak and code optimization
On Sun, Sep 12, 2010 at 1:22 PM, Samsyn d...@synthetic-reality.com wrote: I believe DDMS has much of what you need. For code profiling, search for 'TraceView' * you will want to add some UI to your app to let you toggle tracing on and off, so you can capture samples while your code is doing the thing you're interested in improving. there's also a toggle in the DeviceView of DDMS that start/stops the trace recording. Upon stopping it, it'll launch Traceview too. For memory leak checking, you need to run the full DDMS (not the DDMS panel in eclipse), and you ideally should use that full DDMS to launch the app (either on a emulator or a real phone). If you let eclipse launch it, it will probably grab the access port and then the full DDMS won't be able to connect and you will scratch your head wondering why. Actually AllocationTracker is in the DDMS plug-in too now. Also DDMS has a dump hprof button. If you use from Eclipse it'll open the .hprof in Eclipse. Install MAT (http://eclipse.org/mat/) which is able to identify possible leaks. And if you trace on a real phone, don't forget to give your app permission to write to the SDCARD. Unless you're running froyo. Starting with froyo (2.2), if you use the dump hprof or start/stop tracing buttons in DDMS, the VM is able to record the files locally and send them to DDMs through JDWP instead of storing them on the SD Card (and then have DDMS pull them with adb). For older VMs you will need to have your app use the SD Card permission Xav -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- 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] Map Application available on Android Emulator
Hi, I need some information regarding Map application. I have seen one map application on sdk 1.6 and above. Questions are: 1. Will it be available on all android phones? 2. Can I call this application from my application? If yes then how? I dont know how to call another class. I think, I should know the starting activity's class name. If this is the case, What is the starting activity class name in case of this map application. 3. What will happen to my application, if someone uninstall Map application, in case I use this map application? -- 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: How to reduce padding between cells in TableLayout
On 13 Wrz, 09:17, William Ferguson william.ferguson...@gmail.com wrote: Anyone? On Sep 12, 10:43 pm, William Ferguson william.ferguson...@gmail.com wrote: I have a 3*3 TableLayout that contains buttons. But I cannot seem to remove the spacing between the buttons in the Table. Setting pading to zero for the buttons has no effect. Setting padding and layout_margin to zero for the TableRow has no effect. Setting layout_margin for the TableLayout has no effect. Any idea on how I can alter/remove/reduce the spacing between the cells? William set android:background attribute of some of your buttons to, say, #foo and you will probably see that there is no padding between cells what you now see is button's padding pskink -- 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] Disabling the USB port?
Hi, Is it possible to disable the USB port? Even if the device is physically connected to a host computer via USB cable, no logical connection should be established. What are the sources/programmatic way of doing this? Cheers, Earlence -- 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: any tool in android to find memory leak and code optimization
You can also PMD for code analysis/optimization. -E On Sep 13, 12:20 pm, Xavier Ducrohet x...@android.com wrote: On Sun, Sep 12, 2010 at 1:22 PM, Samsyn d...@synthetic-reality.com wrote: I believe DDMS has much of what you need. For code profiling, search for 'TraceView' * you will want to add some UI to your app to let you toggle tracing on and off, so you can capture samples while your code is doing the thing you're interested in improving. there's also a toggle in the DeviceView of DDMS that start/stops the trace recording. Upon stopping it, it'll launch Traceview too. For memory leak checking, you need to run the full DDMS (not the DDMS panel in eclipse), and you ideally should use that full DDMS to launch the app (either on a emulator or a real phone). If you let eclipse launch it, it will probably grab the access port and then the full DDMS won't be able to connect and you will scratch your head wondering why. Actually AllocationTracker is in the DDMS plug-in too now. Also DDMS has a dump hprof button. If you use from Eclipse it'll open the .hprof in Eclipse. Install MAT (http://eclipse.org/mat/) which is able to identify possible leaks. And if you trace on a real phone, don't forget to give your app permission to write to the SDCARD. Unless you're running froyo. Starting with froyo (2.2), if you use the dump hprof or start/stop tracing buttons in DDMS, the VM is able to record the files locally and send them to DDMs through JDWP instead of storing them on the SD Card (and then have DDMS pull them with adb). For older VMs you will need to have your app use the SD Card permission Xav -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- 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: OpenGL lockups in 2.2
Jeremy, It happened to me quite a bit on both 2.1 and 2.2 on every device. It's surely a defect of Android but so far no one has been able to track it down. It's a tough one, very difficult to reproduce reliably. It tends to happen more often in certain cases for reasons unknown to me right now, such as on an EVO running 2.1 on the third level of Deadly Chambers if you play it straight through. Since that takes 20 minutes, it's impossible to figure out by logging because it's just way too much. Breakpoints don't work because the game doesn't run fast enough in debug mode and debugging doesn't work anyways once the lockup has happened. It's pretty much a worse case scenario - a very fatal, very intermittent bug that breaks debugging and is nearly impossible to isolate. I hope some genius out there can figure this one out. I couldn't even get close. On Sep 12, 10:34 pm, Jeremy Statz jst...@gmail.com wrote: There's been a couple threads about this in the last year or so, but I wanted to draw attention to it again, as I've spent most of the last couple of days trying to confirm it wasn't anything I'm doing. The short story is, I'm pretty sure there's a very serious lock-up-the- phone level bug that happens when using OpenGL applications. When it occurs the phone will freeze for at least two minutes before rebooting itself, sometimes requiring that the battery be pulled. This didn't seem to happen often on 2.1, but I'm seeing it with a lot more regularity on 2.2 (particularly on HTC phones, though that may be a coincidence) and am really hoping to draw some attention from someone in a position to fix it. Typically, you'll end up seeing hundreds of lines of this in the LogCat log: WARN/SharedBufferStack(2005): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. WARN/SharedBufferStack(71): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. There won't be any callstack or error of any kind preceding this. In this case 2005 is my app (a live wallpaper), and 71 appears to be the UI/system process. I'm assuming this is a race condition within SharedBufferStack. I've seen cases where four or five process IDs were all printing the message, all OpenGL apps of some kind. Replicating the problem is very, very difficult and seems very random... in the last case I had to leave the wallpaper running and active on the home screen for about seven hours before it occurred. Sometimes I've had it go days, other times it'll happen within a few minutes. My log output demonstrates no unusual activity at all before the crash, loading/unloading/visibility/etc doesn't seem to be a factor. It's very rare. I kind of feel like this got glossed over the last couple times people have reported it here, but based on my reading it's a long-standing problem with Android and OpenGL and is having a chilling effect on its usage. Is there anyone who can explain if there's anything I can do to discourage problems here? This is beyond my ken honestly, does anyone know this part of the system well? -- 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: How to reduce padding between cells in TableLayout
Thanks. It turns out that a button's default 9 patch background has large chunks of blank space at the side and bottom. No wonder changing the button padding wasn't having any effect. On Sep 13, 5:29 pm, skink psk...@gmail.com wrote: On 13 Wrz, 09:17, William Ferguson william.ferguson...@gmail.com wrote: Anyone? On Sep 12, 10:43 pm, William Ferguson william.ferguson...@gmail.com wrote: I have a 3*3 TableLayout that contains buttons. But I cannot seem to remove the spacing between the buttons in the Table. Setting pading to zero for the buttons has no effect. Setting padding and layout_margin to zero for the TableRow has no effect. Setting layout_margin for the TableLayout has no effect. Any idea on how I can alter/remove/reduce the spacing between the cells? William set android:background attribute of some of your buttons to, say, #foo and you will probably see that there is no padding between cells what you now see is button's padding pskink -- 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: OpenGL lockups in 2.2
I'm sorry - let me clarify something. When I said, quite a bit, I mean that it happened to me on both versions at least once on every device I tested on. To quantify better, it happened maybe a total of 20 times in about 400 hours of play testing. It happens more often to others according to support emails I've received. On Sep 13, 3:22 am, Robert Green rbgrn@gmail.com wrote: Jeremy, It happened to me quite a bit on both 2.1 and 2.2 on every device. It's surely a defect of Android but so far no one has been able to track it down. It's a tough one, very difficult to reproduce reliably. It tends to happen more often in certain cases for reasons unknown to me right now, such as on an EVO running 2.1 on the third level of Deadly Chambers if you play it straight through. Since that takes 20 minutes, it's impossible to figure out by logging because it's just way too much. Breakpoints don't work because the game doesn't run fast enough in debug mode and debugging doesn't work anyways once the lockup has happened. It's pretty much a worse case scenario - a very fatal, very intermittent bug that breaks debugging and is nearly impossible to isolate. I hope some genius out there can figure this one out. I couldn't even get close. On Sep 12, 10:34 pm, Jeremy Statz jst...@gmail.com wrote: There's been a couple threads about this in the last year or so, but I wanted to draw attention to it again, as I've spent most of the last couple of days trying to confirm it wasn't anything I'm doing. The short story is, I'm pretty sure there's a very serious lock-up-the- phone level bug that happens when using OpenGL applications. When it occurs the phone will freeze for at least two minutes before rebooting itself, sometimes requiring that the battery be pulled. This didn't seem to happen often on 2.1, but I'm seeing it with a lot more regularity on 2.2 (particularly on HTC phones, though that may be a coincidence) and am really hoping to draw some attention from someone in a position to fix it. Typically, you'll end up seeing hundreds of lines of this in the LogCat log: WARN/SharedBufferStack(2005): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. WARN/SharedBufferStack(71): waitForCondition(LockCondition) timed out (identity=9, status=0). CPU may be pegged. trying again. There won't be any callstack or error of any kind preceding this. In this case 2005 is my app (a live wallpaper), and 71 appears to be the UI/system process. I'm assuming this is a race condition within SharedBufferStack. I've seen cases where four or five process IDs were all printing the message, all OpenGL apps of some kind. Replicating the problem is very, very difficult and seems very random... in the last case I had to leave the wallpaper running and active on the home screen for about seven hours before it occurred. Sometimes I've had it go days, other times it'll happen within a few minutes. My log output demonstrates no unusual activity at all before the crash, loading/unloading/visibility/etc doesn't seem to be a factor. It's very rare. I kind of feel like this got glossed over the last couple times people have reported it here, but based on my reading it's a long-standing problem with Android and OpenGL and is having a chilling effect on its usage. Is there anyone who can explain if there's anything I can do to discourage problems here? This is beyond my ken honestly, does anyone know this part of the system well? -- 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: I am getting the PVMFInfoUnderflow while playing the video from youtube
Hi All, Actually, what happens is that, the video (from youtube.com) is playing fine for very few seconds (20 to 30 secs). Later I observed the below PVMFInfoUnderflow in log, and from then it got stopped sudden playing the video. Could some one please respond? Thanks, Manoj. manoj wrote: Hi all, while I am playing the video from browser (youtube.com), I am getting the PVMFInfoUnderflow event. Could some one explain why I am getting? in which scenarios we get this error. and if possible try to provide the solution also. Thanks, IIIanoj. -- 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] how do i draw the direction arrow on the map
hi all, question as above. right now, i am creating a class extending mylocationoverlay. then, i override the draw method. is this the correct method? because after i rewrote the draw method, the map tile cannot render. please advise. Thanks! bryan -- 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: any tool in android to find memory leak and code optimization
I found DDMS not sufficiently detailed to find memory leaks, so I use MAT. For full step-by-step instructions on finding memory leaks and using MAT, I suggest this post: http://ttlnews.blogspot.com/2010/01/attacking-memory-problems-on-android.html On Sep 12, 10:09 pm, Sohan badaya sohan.bad...@gmail.com wrote: Hi All, I would like to know is there any tool in android to find memory leak and code optimization. Thanks, Sohan Badaya -- 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] Live Wallpaper WIN DEATH upon restart
I'm getting a WIN DEATH message on shutdown from one of my live wallpapers. Since this occurs at shutdown the user doesn't really notice, it does however reset the lwp to the default paper upon the next restart. Pertinent log message afaik follows. I/PackageManager( 120): Removing non-system package:Hammer.App.VirtualWorld2^M I/Process ( 120): Sending signal. PID: 692 SIG: 9^M I/ActivityManager( 120): Force stopping package Hammer.App.VirtualWorld2 uid=10111^M W/ActivityManager( 120): Scheduling restart of crashed service Hammer.App.VirtualWorld2/.GlDynamicBackground2 in 5000ms^M I/ActivityManager( 120): Force stopping service ServiceRecord{4429a6c8 Hammer.App.VirtualWorld2/.GlDynamicBackground2} ^M W/WallpaperService( 120): Wallpaper service gone: ComponentInfo{Hammer.App.VirtualWorld2/ Hammer.App.VirtualWorld2.GlDynamicBackground2}^M I/WindowManager( 120): WIN DEATH: Window{44249828 Hammer.App.VirtualWorld2.GlDynamicBackground2 paused=false}^M As far as I can tell the lwp isn't being destroyed via Engine.onDestroy() on shutdown, I'm not entirely sure what else I need to take care of so that the system can destroy it cleanly at shutdown? -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Thanks for that! Excellent code. But I have a problem! When I try to do the following: private MyService service=null; private ServiceConnection svcConn=new ServiceConnection() { public void onServiceConnected(ComponentName className, IBinder binder) { service=(MyService)binder; try { service.getRingTone(); } catch (Throwable t) { Log.e(Patchy, Exception in call to registerAccount(), t); //goBlooey(t); } } public void onServiceDisconnected(ComponentName className) { service=null; } }; bindService(new Intent(this, MyService.class), svcConn, BIND_AUTO_CREATE); I get an uncaught exception error on this line: service=(MyService)binder; 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? On Sat, Sep 11, 2010 at 8:22 AM, Federico Paolinelli fedep...@gmail.comwrote: You need to use aidl if you want to call another process. But if you want to interact with the service from activities of the same application, you can call the methods directly from the activity. Check for example this sample code from Mark's tutorial: http://github.com/commonsguy/cw-andtutorials/tree/master/18-LocalService/ On 10 Set, 19:32, Donal Rafferty draf...@gmail.com wrote: As in the following piece of code...? : bindService(bindIntent, mConnection, Context.BIND_AUTO_CREATE); I do that but I think I do require the aidl to be able to call methods from the service? On Fri, Sep 10, 2010 at 6:17 PM, Federico Paolinelli fedep...@gmail.com wrote: In any case, I meant binding the activity to the service using bindService method without passing from the aidl. In this way you will get direct access to the methods of the service directly from the activity. In this way, I suppose you can pass the service an interface to get called when your asynctask finished its job. Try to google for service binding examples. Hope this helps (and I hope I am not saying bullshit as well :-) ) Federico On Fri, Sep 10, 2010 at 7:03 PM, Donal Rafferty draf...@gmail.com wrote: No luck :( --- package com.xxx.phone.ui; import android.media.Ringtone; interface ICallDialogActivity{ void sendRingTone(in RingTone aRingTone); } --- I get the red x beside the import and coundn't find import for class android.media.Ringtone; On Fri, Sep 10, 2010 at 5:45 PM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 10, 2010 at 12:28 PM, Donal Rafferty draf...@gmail.com wrote: Is that possible? I have a bind between my Service and the Activity at the minute but when I try to change to aidl file to allow me pass the RingTone object it wont compile for me, saying RingTone and com.android.RingTone cannot be resolved/found Try android.media.Ringtone. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://github.com/commonsguy http://commonsware.com/blog|http://twitter.com/commonsguyhttp://commonsware.com/blog%7Chttp://twitter.com/commonsguy Android Training in London: http://skillsmatter.com/go/os-mobile-server -- 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 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Federico -- You received this message because you are subscribed to the Google Groups Android
Re: [android-developers] Re: AsyncTask doesn't run sometimes despite state returning RUNNING?
Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty ?: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: is there a way to access the system camera?
thank you that what i wanted. Thanks Taylor. On Sep 11, 1:13 am, Taylor Perkins taylo...@gmail.com wrote: Check out the intents that allow you to access system function. I think the one you are talking about is the following: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent,0); On Thu, Sep 9, 2010 at 12:46, dadada ytbr...@gmail.com wrote: hi all, i saw some application that can use the system camera instead of having just a blank camera preview? ie, the camera preview is the same as the default android camera application with full control. how do i access that? Thank you. -- 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%2Bunsubs cr...@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] Re: canvas woe
Thanks Kostya. it works. So I everytime i onDraw(), i will create new path() and of course .reset(). Thank you. On Sep 12, 11:33 pm, Kostya Vasilyev kmans...@gmail.com wrote: Seems like you apply transformations to mPath over and over again, without resetting. Try moving the code that constructs mPath so it gets created from scratch every time through, as a temporary test. If this works, consider keeping the path constant, applying the transform at canvas level. -- Kostya Vasilyev --http://kmansoft.wordpress.com 12.09.2010 18:53 пользователь dadada ytbr...@gmail.com написал: thanks for your reply. I changed this part to if (mValues != null) { matrix.reset(); matrix.setRotate(-mValues[0]); mPath.transform(matrix);} However, the transformation still goes infinitely. what should be the correct method ? thanks! On Sep 9, 6:08 am, Kostya Vasilyev kmans...@gmail.com wrote: Matrix transformation methods are... 08.09.2010 15:19 пользователь dadada ytbr...@gmail.com написал: hello all, i used matrix to rotate instead of the canvas. However, the result isn't what... -- You received this message because you are subscribed to the Google Groups Android Developers g... -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.comwrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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] Memory reserved for surfaces
Hi everyone! As far as I can understand, and according to what I've been told here, on some Android devices, there exists a pool of memory reserved for Surfaces which is shared by the applications. Is this correct? The exception OutOfResourcesException is related to this pool of memory coming up short. I'm not able to find much information about this memory, so maybe someone can give some here or suggest a place with more explainations. What exactly is stored in this memory? And more important: is it possible to somehow increase this pool? Maybe it could be done by changing something in the Android sources? I started from SurfaceFlinger but I'm still browsing without success. Any idea where exactly? Thank you very much for any information you may provide! -- 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] Adding Contacts in Custom account 2.2
I created a custom account that will create my own contacts but using the ContactsContract that is new in the sdk, when i already provided values and seems like called every method and constant to be used, the only thing that shows in the EditContactActivity and ofcourse having my own account for it to be added. The problem is it only shows First Name and Last Name fields... no numbers and emails? -- 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] Disabling the USB port?
On Mon, Sep 13, 2010 at 3:44 AM, Tez earlencefe...@gmail.com wrote: Is it possible to disable the USB port? You could fill it with glue... Even if the device is physically connected to a host computer via USB cable, no logical connection should be established. What are the sources/programmatic way of doing this? You would need to modify the firmware. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] What is the maximum length for text datatype in SQLite?
I can't seems to find this information, anyone know? -- 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] how to know an opengl method is implemented?
I mean in runtime. Sometimes I get called unimplemented OpenGL ES API error but it can not be catched. Is there a way to figure out what function is implemented or not, in runtime? -- 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] What is the maximum length for text datatype in SQLite?
On Mon, Sep 13, 2010 at 6:37 AM, Mystique joven.ch...@gmail.com wrote: I can't seems to find this information, anyone know? http://sqlite.org/limits.html#max_length -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: how to compile a helloworld in AOSP- Entire android source code..!! Couldnt see apk generated.
Thanks Binggrae...!! Finally .apk file is generated. !! Why is it generated of engineering variants not for other variants...? Any idea ? And when i restarted the emulator i couldnt see the apk picked up automatically...!! I need to install through adb install command. Is it expected ? if the .apk is present in /out/target/product/generic/system/app/ hellomani.apk wont the emulator automatically pick it up ? - mani On Sep 13, 8:45 am, Binggrae bangg...@gmail.com wrote: Sorry it' not helpful.. I'm not sure the following is helpful but recommend try it (Maybe you've tried it already) ~/froyo$ source build/envsetup.sh including device/htc/dream/vendorsetup.sh including device/htc/passion/vendorsetup.sh including device/htc/sapphire/vendorsetup.sh ~/froyo$ choosecombo Build for the simulator or the device? 1. Device 2. Simulator Which would you like? [1] 1 Build type choices are: 1. release 2. debug Which would you like? [1] 1 Which product would you like? [generic] generic Variant choices are: 1. user 2. userdebug 3. eng Which would you like? [eng] 3 PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=2.2 TARGET_PRODUCT=generic TARGET_BUILD_VARIANT=eng TARGET_SIMULATOR=false TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm HOST_ARCH=x86 HOST_OS=linux HOST_BUILD_TYPE=release BUILD_ID=MASTER ~/froyo$ cd packages/apps/HelloWorld$ ~/froyo/packages/apps/HelloWorld$ mm . . . Install: out/target/product/generic/system/app/HelloWorld.apk Good luck.. -- 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] Failed to parse the output of 'adb version' ERROR
Hello, I have the following problem. I was developing in android using the eclipse and android-sdk-windows saved in an folder (e.g. C:\android\android-sdk_r07-windows\android- sdk-windows\ and C:\android\eclipse-pulsar-helios-win32) . But after i downloaded and installed the eclipse and android sdk again, in the after folder , i got this error message: Failed to parse the output of 'adb version' and can't run my application, because the emutaros that starts is not identified by the eclipse, i can't find it into Devices tab from eclipse. I found from the net the following http://stackoverflow.com/questions/2260118/failed-to-parse-the-output-of-adb-version = //-- Try closing Eclipse, issuing a 'C:\Users\Mohit\Documents\AndroidSDK \tools kill-server' command from terminal and retrying. If that still doesn't work, you could try opening Activity Monitor to see if there are any existing adb processes running, and kill them. //- but i am using Windows XP and i don't know how to use kill-server command from the terminal. I mean in run/cmd there are is no such a command or how can i use the second solution - to open Activity Monitor from Windows XP Please help me. Lidia -- 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] Adding permission in framework.
How can I add some permission in framework , is it any way to do this ?? -- 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] Failed to parse the output of 'adb version' ERROR
ok, i found how to use adb kill-server, but it is thinking too much while tying to kill --- On Mon, 9/13/10, Lidy lidyp...@yahoo.com wrote: From: Lidy lidyp...@yahoo.com Subject: [android-developers] Failed to parse the output of 'adb version' ERROR To: Android Developers android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:32 AM Hello, I have the following problem. I was developing in android using the eclipse and android-sdk-windows saved in an folder (e.g. C:\android\android-sdk_r07-windows\android- sdk-windows\ and C:\android\eclipse-pulsar-helios-win32) . But after i downloaded and installed the eclipse and android sdk again, in the after folder , i got this error message: Failed to parse the output of 'adb version' and can't run my application, because the emutaros that starts is not identified by the eclipse, i can't find it into Devices tab from eclipse. I found from the net the following http://stackoverflow.com/questions/2260118/failed-to-parse-the-output-of-adb-version = //-- Try closing Eclipse, issuing a 'C:\Users\Mohit\Documents\AndroidSDK \tools kill-server' command from terminal and retrying. If that still doesn't work, you could try opening Activity Monitor to see if there are any existing adb processes running, and kill them. //- but i am using Windows XP and i don't know how to use kill-server command from the terminal. I mean in run/cmd there are is no such a command or how can i use the second solution - to open Activity Monitor from Windows XP Please help me. Lidia -- 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 -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.com wrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.comwrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Sorry I meant only the preExecute is run On Mon, Sep 13, 2010 at 1:05 PM, Donal Rafferty draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.comwrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.comwrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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] Reading SIM Card ID and Phone number from SIM Card
Hi I require to read the SIM Cards data from my android phone.Could any body please let me know how i can do this in Android phone. -- *Thanks and Regards Ajmer Singh* -- 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] Custom Account / Sync adapter: inability to edit contacts?
Hi! When creating a custom account and/or sync adapter, raw_contacts that belong to your custom account can be created. But it looks like that they then cannot be edited with the Contact app! Is this a known limitation, or a problem in my code? Thanks a lot for your help. BoD -- 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: Disabling the USB port?
Is there any other way that can block the USB port so that no data is transferred? Where are the corresponding source files? Cheers, Earlence On Sep 13, 3:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Sep 13, 2010 at 3:44 AM, Tez earlencefe...@gmail.com wrote: Is it possible to disable the USB port? You could fill it with glue... Even if the device is physically connected to a host computer via USB cable, no logical connection should be established. What are the sources/programmatic way of doing this? You would need to modify the firmware. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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] Failed to parse the output of 'adb version' ERROR
Please help me, i can't resolve this problem, and can't work . I still have the same error: [2010-09-13 14:49:27 - MopayApi3] The connection to adb is down, and a severe error has occured. [2010-09-13 14:49:27 - MopayApi3] You must restart adb and Eclipse. [2010-09-13 14:49:27 - MopayApi3] Please ensure that adb is correctly located at 'C:\*\android-sdk-windows\tools\adb.exe' and can be executed. The eclipse can't see started emulator and even the android device. I found on http://groups.google.com/group/android-developers/browse_thread/thread/cd7cd3a83b9f39e7 to runt following commands but don't know from where exavctly. start emulator telnet localhost 5554 kill I would appreciate any help Lidia --- On Mon, 9/13/10, Lidia G lidyp...@yahoo.com wrote: From: Lidia G lidyp...@yahoo.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:57 AM ok, i found how to use adb kill-server, but it is thinking too much while tying to kill --- On Mon, 9/13/10, Lidy lidyp...@yahoo.com wrote: From: Lidy lidyp...@yahoo.com Subject: [android-developers] Failed to parse the output of 'adb version' ERROR To: Android Developers android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:32 AM Hello, I have the following problem. I was developing in android using the eclipse and android-sdk-windows saved in an folder (e.g. C:\android\android-sdk_r07-windows\android- sdk-windows\ and C:\android\eclipse-pulsar-helios-win32) . But after i downloaded and installed the eclipse and android sdk again, in the after folder , i got this error message: Failed to parse the output of 'adb version' and can't run my application, because the emutaros that starts is not identified by the eclipse, i can't find it into Devices tab from eclipse. I found from the net the following http://stackoverflow.com/questions/2260118/failed-to-parse-the-output-of-adb-version = //-- Try closing Eclipse, issuing a 'C:\Users\Mohit\Documents\AndroidSDK \tools kill-server' command from terminal and retrying. If that still doesn't work, you could try opening Activity Monitor to see if there are any existing adb processes running, and kill them. //- but i am using Windows XP and i don't know how to use kill-server command from the terminal. I mean in run/cmd there are is no such a command or how can i use the second solution - to open Activity Monitor from Windows XP Please help me. Lidia -- 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 -- 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 -- 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] GOOGLE, WHAT IS GOING ON with the Active Install %? Bug in install to SDCARD is my guess!
On Sat, Sep 4, 2010 at 6:16 AM, Fabrizio Giudici fabrizio.giud...@tidalwave.it wrote: So, can you tell us which part of Google we should talk to in order to get some answer to the problem? Here's another option. Everyone with this issue should try this one: http://www.google.com/support/androidmarket/bin/request.py?contact_type=publisher - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Adding permission in framework.
read the manual! On Sep 13, 4:49 pm, Rahul Garg rahul.lnm...@gmail.com wrote: How can I add some permission in framework , is it any way to do this ?? -- 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: Is anyone's active install % dropping like a rock lately?
Everyone with this issue should try this link: http://www.google.com/support/androidmarket/bin/request.py?contact_type=publisher Meanwhile my paid app % is approaching that of my free version, which is simply ridiculous, and I've dropped 3 spots in my category. How are you guys doing? Better, same, worse? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] Where has hierarchyviewer.bat gone?
After updating my SDK Tools to Rev.7 I no longer have hierarchyviewer.bat in the tools directory, any Idea anybody? Running on MS-Windows, updated ADT too (0.9.8). Found no reference on http://developer.android.com/sdk/tools-notes.html. android-sdk\tools\lib\hierarchyviewer.jar is present. Would it work to restore an old hierarchyviewer.bat or download one to start the hierarchy viewer? Thanks, R. Deckard. -- 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] Can we use Map Application installed on Android emualtor with sdk 1.6?
Hi, I need some information regarding Map application which is installed on Android emulator 1.6. Questions are: 1. Will it be available on all android phones? 2. Can I call this application from my application? If yes then how? I dont know how to call another class. I think, I should know the starting activity's class name. If this is the case, What is the starting activity class name in case of this map application? 3. What will happen to my application, if someone uninstall Map application, in case I use this map application?(I am not sure but I think user can uninstall native application.) -- 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: is there a way to implement screenshot functionality in android
On Sun, Sep 12, 2010 at 9:54 PM, argon gold argongol...@gmail.com wrote: There is a screen capture application for android. Please check it. http://www.androlib.com/android.application.net-srcz-android-screenshot-zEtD.aspx *FOR ROOT DEVICE ONLY* Some one comments on this application as Absolutely Great, Works fine, Its the easiest way to take ScreenShots on your android used often for our site. Some else comments: * Doesn't work on my Nexus 1. gets corrupt image * Empty, black screen captured on rooted motorola droid * Doesnt work! Lame * Creates corrupt images on nexus one - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] listview with different xml for rows
Hi all i want to implement listview with uses different xml layouts for rows depending on underlying item. A non optimal solution will be int getView method just to inflate every time a new view depending on the item from the adapter. Is there a better way to do this ? -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Donal, Search the list: there was a post within the last month (I think) from Romain Guy about some kind of thread race issue in AsyncTask having been fixed in Froyo (or was it post-Froyo?) - anyway, it's somewhere in the archives. -- Kostya 13.09.2010 16:07, Donal Rafferty пишет: Sorry I meant only the preExecute is run On Mon, Sep 13, 2010 at 1:05 PM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
Re: [android-developers] Failed to parse the output of 'adb version' ERROR
What are your: - Desktop OS (Windows / Mac / Linux), version and 32/64 bit-ness? - Java SDK version and bitness? - Eclipse version and bitness? -- Kostya 13.09.2010 17:00, Lidia G ?: Please help me, i can't resolve this problem, and can't work . I still have the same error: [2010-09-13 14:49:27 - MopayApi3] The connection to adb is down, and a severe error has occured. [2010-09-13 14:49:27 - MopayApi3] You must restart adb and Eclipse. [2010-09-13 14:49:27 - MopayApi3] Please ensure that adb is correctly located at 'C:\*\android-sdk-windows\tools\adb.exe' and can be executed. The eclipse can't see started emulator and even the android device. I found on http://groups.google.com/group/android-developers/browse_thread/thread/cd7cd3a83b9f39e7 to runt following commands but don't know from where exavctly. start emulator telnet localhost 5554 kill I would appreciate any help Lidia --- On *Mon, 9/13/10, Lidia G /lidyp...@yahoo.com/* wrote: From: Lidia G lidyp...@yahoo.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:57 AM ok, i found how to use adb kill-server, but it is thinking too much while tying to kill --- On *Mon, 9/13/10, Lidy /lidyp...@yahoo.com/* wrote: From: Lidy lidyp...@yahoo.com Subject: [android-developers] Failed to parse the output of 'adb version' ERROR To: Android Developers android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:32 AM Hello, I have the following problem. I was developing in android using the eclipse and android-sdk-windows saved in an folder (e.g. C:\android\android-sdk_r07-windows\android- sdk-windows\ and C:\android\eclipse-pulsar-helios-win32) . But after i downloaded and installed the eclipse and android sdk again, in the after folder , i got this error message: Failed to parse the output of 'adb version' and can't run my application, because the emutaros that starts is not identified by the eclipse, i can't find it into Devices tab from eclipse. I found from the net the following http://stackoverflow.com/questions/2260118/failed-to-parse-the-output-of-adb-version = //-- Try closing Eclipse, issuing a 'C:\Users\Mohit\Documents\AndroidSDK \tools kill-server' command from terminal and retrying. If that still doesn't work, you could try opening Activity Monitor to see if there are any existing adb processes running, and kill them. //- but i am using Windows XP and i don't know how to use kill-server command from the terminal. I mean in run/cmd there are is no such a command or how can i use the second solution - to open Activity Monitor from Windows XP Please help me. Lidia -- 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 -- 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 -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Failed to parse the output of 'adb version' ERROR
Hello I have -Desktop Windows XP 32bit -JAVA 1.6 -Eclipse pulsar GALILEO for win32 bit --- On Mon, 9/13/10, Kostya Vasilyev kmans...@gmail.com wrote: From: Kostya Vasilyev kmans...@gmail.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 1:31 PM What are your: - Desktop OS (Windows / Mac / Linux), version and 32/64 bit-ness? - Java SDK version and bitness? - Eclipse version and bitness? -- Kostya 13.09.2010 17:00, Lidia G пишет: Please help me, i can't resolve this problem, and can't work . I still have the same error: [2010-09-13 14:49:27 - MopayApi3] The connection to adb is down, and a severe error has occured. [2010-09-13 14:49:27 - MopayApi3] You must restart adb and Eclipse. [2010-09-13 14:49:27 - MopayApi3] Please ensure that adb is correctly located at 'C:\*\android-sdk-windows\tools\adb.exe' and can be executed. The eclipse can't see started emulator and even the android device. I found on http://groups.google.com/group/android-developers/browse_thread/thread/cd7cd3a83b9f39e7 to runt following commands but don't know from where exavctly. start emulator telnet localhost 5554 kill I would appreciate any help Lidia --- On Mon, 9/13/10, Lidia G lidyp...@yahoo.com wrote: From: Lidia G lidyp...@yahoo.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:57 AM ok, i found how to use adb kill-server, but it is thinking too much while tying to kill --- On Mon, 9/13/10, Lidy lidyp...@yahoo.com wrote: From: Lidy lidyp...@yahoo.com Subject: [android-developers] Failed to parse the output of 'adb version' ERROR To: Android Developers android-developers@googlegroups.com Date: Monday, September 13, 2010, 11:32 AM Hello, I have the following problem. I was developing in android using the eclipse and android-sdk-windows saved in an folder (e.g. C:\android\android-sdk_r07-windows\android- sdk-windows\ and C:\android\eclipse-pulsar-helios-win32) . But after i downloaded and installed the eclipse and android sdk again, in the after folder , i got this error message: Failed to parse the output of 'adb version' and can't run my application, because the emutaros that starts is not identified by the eclipse, i can't find it into Devices tab from eclipse. I found from the net the following http://stackoverflow.com/questions/2260118/failed-to-parse-the-output-of-adb-version = //-- Try closing Eclipse, issuing a 'C:\Users\Mohit\Documents\AndroidSDK \tools kill-server' command from terminal and retrying. If that still doesn't work, you could try opening Activity Monitor to
Re: [android-developers] Edittext Cursor and Highlight Problem
On Wed, Sep 1, 2010 at 9:56 AM, SurtaX garylo@gmail.com wrote: I am trying to implement a textview which has select text/copy and paste functionality. Why? I just tried playing an EditText I use in my app that's basically as default as can get and I can select text, copy, and paste without any blinking cursor during the process. So as far as I can tell, this default behavior and I'm not sure what you're trying to accomplish. This on Nexus One with 2.2, don't know if it's changed. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Kostya, Thanks, that conversation can be seen here: http://groups.google.com/group/android-developers/browse_thread/thread/07ea01892ee7a5f4/9f71428217c2cd44 However the condition is in the cancel code, which I no longer use as I am running the code in a Service so I have no need to cancel it. 2010/9/13 Kostya Vasilyev kmans...@gmail.com Donal, Search the list: there was a post within the last month (I think) from Romain Guy about some kind of thread race issue in AsyncTask having been fixed in Froyo (or was it post-Froyo?) - anyway, it's somewhere in the archives. -- Kostya 13.09.2010 16:07, Donal Rafferty пишет: Sorry I meant only the preExecute is run On Mon, Sep 13, 2010 at 1:05 PM, Donal Rafferty draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.comwrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.comwrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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
[android-developers] How to take care of form factor(screen size) and resoultion
If I wish to run my application on different devices with different screen size and/or resolution then how can it be achieved? For example if I have given a padding of 5px for one particular screen size. That might not look good for a device having larger or smaller screen than this device. I understand that for the controls which has size as wrap content or fill_parent, it will work fine. But what could be done for hard coded values. If two devices have different screen resolution then i would need different images, if I am using some image in my application. Do I need to create different build for different resolution or there is some way to create more drawable folders with different name and choosing one of them as we do for localization. -- 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] listview with different xml for rows
There is support for this: - Override getViewTypeCount in the adapter, return how many types of views are needed. - Override getItemViewType in the adapter, return the type of view for a particular item. - ListView will take these in consideration when recycling views, getView will only recycle views if they are of the same type. -- Kostya 13.09.2010 17:28, manigault пишет: Hi all i want to implement listview with uses different xml layouts for rows depending on underlying item. A non optimal solution will be int getView method just to inflate every time a new view depending on the item from the adapter. Is there a better way to do this ? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Failed to parse the output of 'adb version' ERROR
Which build of Java - 1.6 update 20 or 21? Some issues were reported with update 21, so if you are using it, can you try rolling back to update 20? The rest looks ok. -- Kostya 13.09.2010 17:41, Lidia G пишет: Hello I have -Desktop Windows XP 32bit -JAVA 1.6 -Eclipse pulsar GALILEO for win32 bit --- On *Mon, 9/13/10, Kostya Vasilyev /kmans...@gmail.com/* wrote: From: Kostya Vasilyev kmans...@gmail.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 1:31 PM What are your: - Desktop OS (Windows / Mac / Linux), version and 32/64 bit-ness? - Java SDK version and bitness? - Eclipse version and bitness? -- Kostya 13.09.2010 17:00, Lidia G пишет: Please help me, i can't resolve this problem, and can't work . I still have the same error: [2010-09-13 14:49:27 - MopayApi3] The connection to adb is down, and a severe error has occured. [2010-09-13 14:49:27 - MopayApi3] You must restart adb and Eclipse. [2010-09-13 14:49:27 - MopayApi3] Please ensure that adb is correctly located at 'C:\*\android-sdk-windows\tools\adb.exe' and can be executed. The eclipse can't see started emulator and even the android device. I found on http://groups.google.com/group/android-developers/browse_thread/thread/cd7cd3a83b9f39e7 to runt following commands but don't know from where exavctly. start emulator telnet localhost 5554 kill I would appreciate any help Lidia --- On *Mon, 9/13/10, Lidia G /lidyp...@yahoo.com /mc/compose?to=lidyp...@yahoo.com/* wrote: From: Lidia G lidyp...@yahoo.com /mc/compose?to=lidyp...@yahoo.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com /mc/compose?to=android-develop...@googlegroups.com Date: Monday, September 13, 2010, 11:57 AM ok, i found how to use adb kill-server, but it is thinking too much while tying to kill --- On *Mon, 9/13/10, Lidy /lidyp...@yahoo.com /mc/compose?to=lidyp...@yahoo.com/* wrote: From: Lidy lidyp...@yahoo.com /mc/compose?to=lidyp...@yahoo.com Subject: [android-developers] Failed to parse the output of 'adb version' ERROR To: Android Developers android-developers@googlegroups.com /mc/compose?to=android-develop...@googlegroups.com Date: Monday, September 13, 2010, 11:32 AM Hello, I have the following problem. I was developing in android using the eclipse and android-sdk-windows saved in an folder (e.g. C:\android\android-sdk_r07-windows\android- sdk-windows\ and C:\android\eclipse-pulsar-helios-win32) . But after i downloaded and installed the eclipse and android sdk again, in the after folder , i got this error message: Failed to parse the output of 'adb version' and can't run my application, because the emutaros that starts is not identified by the eclipse, i can't find it into Devices tab from eclipse. I found from the net the following http://stackoverflow.com/questions/2260118/failed-to-parse-the-output-of-adb-version = //-- Try closing Eclipse, issuing a 'C:\Users\Mohit\Documents\AndroidSDK \tools kill-server' command from terminal and retrying. If that still doesn't work, you could try opening Activity Monitor to see if there are any existing adb processes running, and kill them. //- but i am using Windows XP and i don't know how to use kill-server command from the terminal. I mean in run/cmd there are is no such a command or how can i use the second solution - to open Activity Monitor from Windows XP Please help me. Lidia -- 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
[android-developers] Re: ContentObserver not working
From my limited usage of ContentObserver, it is used to determine when a single record of the database changes. If you want to observe many records, I believe that you need to use a DataSetObserver. Look at the source code for how SimpleCursorAdapter uses them. I'd be interested in clarification, if I am incorrect about this. On Sep 13, 2:39 am, Sohan badaya sohan.bad...@gmail.com wrote: Hi All, I want to write a code that will notify me whenever my database changes. For example I write a code that extends ContentObserver class and overrieds onChange() method. and in registration time i am giving url Contacts.People.CONTENT_URI. so i want when some modify contacts onChange() method should be called. But its not working. Please help me for the same. Thanks, Sohan Badaya -- 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: Is anyone's active install % dropping like a rock lately?
Meanwhile my paid app % is approaching that of my free version, which is simply ridiculous, and I've dropped 3 spots in my category. How are you guys doing? Better, same, worse? 80%-50%. Virtually all of my sales were last 6 weeks. App continues to get 4.5 stars. Pent -- 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] How to take care of form factor(screen size) and resoultion
Have you read through this? http://developer.android.com/guide/practices/screens_support.html 13.09.2010 17:49, cool.manish пишет: If I wish to run my application on different devices with different screen size and/or resolution then how can it be achieved? For example if I have given a padding of 5px for one particular screen size. That might not look good for a device having larger or smaller screen than this device. I understand that for the controls which has size as wrap content or fill_parent, it will work fine. But what could be done for hard coded values. If two devices have different screen resolution then i would need different images, if I am using some image in my application. Do I need to create different build for different resolution or there is some way to create more drawable folders with different name and choosing one of them as we do for localization. -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Donal, It sort of seems like you reuse the same task over and over. What happens if you create a new task each time you need to perform the asynchronous operation? -- Kostya 13.09.2010 17:44, Donal Rafferty пишет: Kostya, Thanks, that conversation can be seen here: http://groups.google.com/group/android-developers/browse_thread/thread/07ea01892ee7a5f4/9f71428217c2cd44 However the condition is in the cancel code, which I no longer use as I am running the code in a Service so I have no need to cancel it. 2010/9/13 Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com Donal, Search the list: there was a post within the last month (I think) from Romain Guy about some kind of thread race issue in AsyncTask having been fixed in Froyo (or was it post-Froyo?) - anyway, it's somewhere in the archives. -- Kostya 13.09.2010 16:07, Donal Rafferty пишет: Sorry I meant only the preExecute is run On Mon, Sep 13, 2010 at 1:05 PM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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 mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com
Re: [android-developers] Failed to parse the output of 'adb version' ERROR
I don't know how to find out. Can you tell me please where to find in eclipse which build of java is used --- On Mon, 9/13/10, Kostya Vasilyev kmans...@gmail.com wrote: From: Kostya Vasilyev kmans...@gmail.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 1:52 PM Which build of Java - 1.6 update 20 or 21? Some issues were reported with update 21, so if you are using it, can you try rolling back to update 20? The rest looks ok. -- Kostya -- 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] Failed to parse the output of 'adb version' ERROR
From the command line, run java -version 13.09.2010 18:13, Lidia G ?: I don't know how to find out. Can you tell me please where to find in eclipse which build of java is used --- On *Mon, 9/13/10, Kostya Vasilyev /kmans...@gmail.com/* wrote: From: Kostya Vasilyev kmans...@gmail.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 1:52 PM Which build of Java - 1.6 update 20 or 21? Some issues were reported with update 21, so if you are using it, can you try rolling back to update 20? The rest looks ok. -- Kostya -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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: Disabling the USB port?
On Mon, Sep 13, 2010 at 8:59 AM, Tez earlencefe...@gmail.com wrote: Is there any other way that can block the USB port so that no data is transferred? I sure hope not. Where are the corresponding source files? I have no idea. I work at the SDK level, and I know there's nothing much in the SDK related to USB. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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] Can we use Map Application installed on Android emualtor with sdk 1.6?
On Mon, Sep 13, 2010 at 9:20 AM, cool.manish mannishga...@gmail.com wrote: Questions are: 1. Will it be available on all android phones? No. 2. Can I call this application from my application? If yes then how? See the geo: Intent syntax described here: http://developer.android.com/guide/appendix/g-app-intents.html See here for a sample: http://github.com/commonsguy/cw-android/tree/master/Activities/Launch/ I think, I should know the starting activity's class name. No. 3. What will happen to my application, if someone uninstall Map application, in case I use this map application?(I am not sure but I think user can uninstall native application.) Maps, where it exists, usually has a base version installed permanently, and updates that may come from the Market. If there is nothing on the device to handle the geo: Intent, your application will crash. You can use PackageManager and queryIntentActivities() to see if a given Intent is safe to use with startActivity(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: ContentObserver not working
onChange() method. and in registration time i am giving url Contacts.People.CONTENT_URI. That's deprecated, if you're on a super-new device maybe it doesn't work anymore ? ContentObserver definitely works in general. Try CallLog.CONTENT_URI, see if it works. I'm using that one myself without problem. Then switch to the newer ContactsContract API. Pent -- 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: Android 2.2 - width=device-width No Longer Working
Parag, I'm still testing this morning - but that does seem to be the answer to my issue - thank you very much for posting! Info in the official docs: http://developer.android.com/reference/android/webkit/WebView.html Search for target-densitydpi James Short, note the entry on -webkit-device-pixel-ratio for the problems you mentioned. -- 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] how do i draw the direction arrow on the map
On Mon, Sep 13, 2010 at 3:35 AM, dadada ytbr...@gmail.com wrote: question as above. What is the direction arrow? You mean the indicator on the MyLocationOverlay that Google Maps shows? right now, i am creating a class extending mylocationoverlay. then, i override the draw method. is this the correct method? Sure. You also probably want to call this: http://code.google.com/android/add-ons/google-apis/reference/index.html because after i rewrote the draw method, the map tile cannot render. Map tiles have nothing to do with the MyLocationOverlay. You're doing something else wrong. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Disabling the USB port?
Compile a kernel without usb drivers. You will need root or an engineering bootloader to install it. Or you could just leave usb debugging off and decline to mount mass storage mode. Tez wrote: Is there any other way that can block the USB port so that no data is transferred? Where are the corresponding source files? Cheers, Earlence On Sep 13, 3:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Sep 13, 2010 at 3:44 AM, Tez earlencefe...@gmail.com wrote: Is it possible to disable the USB port? You could fill it with glue... Even if the device is physically connected to a host computer via USB cable, no logical connection should be established. What are the sources/programmatic way of doing this? You would need to modify the firmware. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Kostya, I do create a new Task as follows everytime: new SelectRingtoneTask().execute(); But I had to use Looper.prepare(); to get it to work in my Service, this could be causing an issue? Is there a proper way to use a AsyncTask in a Service without needing to call Looper.prepare();? 2010/9/13 Kostya Vasilyev kmans...@gmail.com Donal, It sort of seems like you reuse the same task over and over. What happens if you create a new task each time you need to perform the asynchronous operation? -- Kostya 13.09.2010 17:44, Donal Rafferty пишет: Kostya, Thanks, that conversation can be seen here: http://groups.google.com/group/android-developers/browse_thread/thread/07ea01892ee7a5f4/9f71428217c2cd44 However the condition is in the cancel code, which I no longer use as I am running the code in a Service so I have no need to cancel it. 2010/9/13 Kostya Vasilyev kmans...@gmail.com Donal, Search the list: there was a post within the last month (I think) from Romain Guy about some kind of thread race issue in AsyncTask having been fixed in Froyo (or was it post-Froyo?) - anyway, it's somewhere in the archives. -- Kostya 13.09.2010 16:07, Donal Rafferty пишет: Sorry I meant only the preExecute is run On Mon, Sep 13, 2010 at 1:05 PM, Donal Rafferty draf...@gmail.comwrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.comwrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.comwrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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
[android-developers] Re: how do i draw the direction arrow on the map
i didn't mean that compass that you can enable. i mean some graphical arrow that i can draw on top of the map. it will stay on top irregardless of zoom level. the direction arrow will show the bearing to my destination. then should it be the Overlay class? Yes i am really lost what should i do. On Sep 13, 10:38 pm, TreKing treking...@gmail.com wrote: On Mon, Sep 13, 2010 at 3:35 AM, dadada ytbr...@gmail.com wrote: question as above. What is the direction arrow? You mean the indicator on the MyLocationOverlay that Google Maps shows? right now, i am creating a class extending mylocationoverlay. then, i override the draw method. is this the correct method? Sure. You also probably want to call this:http://code.google.com/android/add-ons/google-apis/reference/index.html because after i rewrote the draw method, the map tile cannot render. Map tiles have nothing to do with the MyLocationOverlay. You're doing something else wrong. --- -- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Launch two Activities extended from another one.
Hello, Frank! No problem, it is not something special. Here goes application . . .. . .. . . activity android:name=A intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter . . . /activity activity android:name=B intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter . . . /activity . . .. . .. . . /application Thanks a lot for your attention to my problem! -- 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: how do i draw the direction arrow on the map
On Mon, Sep 13, 2010 at 9:51 AM, dadada ytbr...@gmail.com wrote: i mean some graphical arrow that i can draw on top of the map. it will stay on top irregardless of zoom level. the direction arrow will show the bearing to my destination. then should it be the Overlay class? You could add an Overlay (not MyLocationOverlay), and do custom drawing to draw an arrow bitmap oriented as necessary (the rotation is simple trig math given two points). You could also add an ImageView to the MapView, again rotating it as necessary. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] Launch two Activities extended from another one.
On Fri, Sep 3, 2010 at 3:26 PM, SpaceJack ss4te...@gmail.com wrote: That is I start A, then press Home key and move task back, then try to start B, but get onRestart() of my BaseClass, not onCreate(). Sounds strange. You're not doing anything funky with static variables? And what does // We can make out here which activity (A | B) to create. mean in your base class onCreate mean? That sounds suspect. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Donal, You having to call Looper.prepare makes it seem like you're not creating your task and calling its execute() from the UI thread. Is that so? The docs is actually quite clear on this, see Threading rules: http://developer.android.com/reference/android/os/AsyncTask.html 13.09.2010 18:50, Donal Rafferty пишет: Kostya, I do create a new Task as follows everytime: new SelectRingtoneTask().execute(); But I had to use Looper.prepare(); to get it to work in my Service, this could be causing an issue? Is there a proper way to use a AsyncTask in a Service without needing to call Looper.prepare();? 2010/9/13 Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com Donal, It sort of seems like you reuse the same task over and over. What happens if you create a new task each time you need to perform the asynchronous operation? -- Kostya 13.09.2010 17:44, Donal Rafferty пишет: Kostya, Thanks, that conversation can be seen here: http://groups.google.com/group/android-developers/browse_thread/thread/07ea01892ee7a5f4/9f71428217c2cd44 However the condition is in the cancel code, which I no longer use as I am running the code in a Service so I have no need to cancel it. 2010/9/13 Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com Donal, Search the list: there was a post within the last month (I think) from Romain Guy about some kind of thread race issue in AsyncTask having been fixed in Froyo (or was it post-Froyo?) - anyway, it's somewhere in the archives. -- Kostya 13.09.2010 16:07, Donal Rafferty пишет: Sorry I meant only the preExecute is run On Mon, Sep 13, 2010 at 1:05 PM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.com mailto:draf...@gmail.com wrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.com mailto:kmans...@gmail.com wrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/LocalService.html has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676:
Re: [android-developers] Failed to parse the output of 'adb version' ERROR
i changed to update 20, and it is still not working. I closed the eclipse run from command line adb kill-server then adb start-server -it says daemon started succesfully then opened the eclipse again, and there is still the same error i don't know what to do else --- On Mon, 9/13/10, Kostya Vasilyev kmans...@gmail.com wrote: From: Kostya Vasilyev kmans...@gmail.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 2:16 PM From the command line, run java -version 13.09.2010 18:13, Lidia G пишет: I don't know how to find out. Can you tell me please where to find in eclipse which build of java is used --- On Mon, 9/13/10, Kostya Vasilyev kmans...@gmail.com wrote: From: Kostya Vasilyev kmans...@gmail.com Subject: Re: [android-developers] Failed to parse the output of 'adb version' ERROR To: android-developers@googlegroups.com Date: Monday, September 13, 2010, 1:52 PM Which build of Java - 1.6 update 20 or 21? Some issues were reported with update 21, so if you are using it, can you try rolling back to update 20? The rest looks ok. -- Kostya -- 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 -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 -- 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] how do i launch google street view from app
hi all, question as above. I cannot find anything in the sdk regarding google street view. do we launch it from the web? please advise. thanks. -- 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] how do i launch google street view from app
On Mon, Sep 13, 2010 at 10:18 AM, dadada ytbr...@gmail.com wrote: I cannot find anything in the sdk regarding google street view. Really? http://developer.android.com/guide/appendix/g-app-intents.html - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] How to get Latitude and longitude information
Hi All, If I click the button I will show current lattitude and longitude value in textbox.. I dont know how to achieve this..! i am using htc hero emulator..! Eagerly waiting for reply.. Thanks in Advance, Gold -- 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] Displaying HTML markup in WebView
Hi all. I'm receiving XML which contains elements of HTML and I want to display these to the users. Therefore, I have to set the content programmatically, rather than extract the strings from an android xml resource. I'm using a WebView to display the content, rather than TextView, as it handles some of the HTML markup - bold text for example, and links. However WebView does appear to be rather limited. For example, the content I want to display contains definition links: pThis is a dfn title='some definition'definition/dfn/p I've been looking at this for a while now, and can't really think of a way to capture this in android. The idea would be that when the relevant word is clicked, the definition pops up. Any ideas appreciated! -- 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] How to get Latitude and longitude information
On Mon, Sep 13, 2010 at 10:57 AM, Gold thangadura...@gmail.com wrote: I dont know how to achieve this..! Which part? Clicking a button? Showing the values? Getting the values? What do you have working so far? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: SQLite DB: insert VERY slow
On Sep 11, 12:10 pm, Mark Murphy mmur...@commonsware.com wrote: By default, each insert is its own transaction, involving individual flash writes, which gets slow. Batch the inserts (e.g., 100 to a transaction), and things will go more smoothly. Wow, thanks for the tip! I hadn't been bothering with transactions on my inserts (the data involved isn't that mission-critical), but adding them just now sped things up considerably. String -- 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] Displaying HTML markup in WebView
Looks like your data is a mix of HTML tags and custom tags that have meaning only for your application. On the other end, WebView works with HTML, and doesn't understand those special tags. I think one way to make it work is to transform those custom tags into HTML ones with proper Javascript crutches to implement the functionality you seek. This can be done with XSLT, supposedly Xalan supports SAX and possibly can be built on Android (you could try it and write up your experiences). http://xml.apache.org/xalan-j/ You could also probably do the transformation by hand, using Java String and friends. -- Kostya 13.09.2010 20:10, Neilz пишет: Hi all. I'm receiving XML which contains elements of HTML and I want to display these to the users. Therefore, I have to set the content programmatically, rather than extract the strings from an android xml resource. I'm using a WebView to display the content, rather than TextView, as it handles some of the HTML markup - bold text for example, and links. However WebView does appear to be rather limited. For example, the content I want to display contains definition links: pThis is adfn title='some definition'definition/dfn/p I've been looking at this for a while now, and can't really think of a way to capture this in android. The idea would be that when the relevant word is clicked, the definition pops up. Any ideas appreciated! -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] Displaying HTML markup in WebView
On Mon, Sep 13, 2010 at 12:10 PM, Neilz neilhorn...@gmail.com wrote: For example, the content I want to display contains definition links: pThis is a dfn title='some definition'definition/dfn/p I've been looking at this for a while now, and can't really think of a way to capture this in android. The idea would be that when the relevant word is clicked, the definition pops up. Any ideas appreciated! I would think you would handle that in Javascript and DHTML. At worst, handle it in Javascript and have it call to an object you inject via addJavascriptInterface() if you want native Android widgets to handle the popup. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Donal, I'm mildly surprised Mark Murphy hasn't chimed in on this himself, but here's a current post from his blog which looks relevant: http://commonsware.com/blog/2010/09/10/asynctask-screen-rotation.html HTH, String On Sep 13, 1:05 pm, Donal Rafferty draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.com wrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.comwrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/examp... has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.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%2Bunsubs cr...@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] Re: How to get Latitude and longitude information
Hi..! In my android application..after login the user has to send current position to server..! the button name currentLocation. if the user click the button current location , lattitude and longitude will be displayed in the text box as well as send to server Eagerly waiting for reply..! Thanks in Advance, Gold On Sep 13, 9:11 pm, TreKing treking...@gmail.com wrote: On Mon, Sep 13, 2010 at 10:57 AM, Gold thangadura...@gmail.com wrote: I dont know how to achieve this..! Which part? Clicking a button? Showing the values? Getting the values? What do you have working so far? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Where has hierarchyviewer.bat gone?
On Mon, Sep 13, 2010 at 3:19 PM, repDetect() n6mba50...@gmail.com wrote: Would it work to restore an old hierarchyviewer.bat or download one to start the hierarchy viewer? It worked. Maybe it's just my luck to get this issue but in case someone else needs that batch file, its content is below, use it at your own risk on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. I'm not sure which version of the sdk it belongs to and have no way of knowing if it would work right for you or blow up. Just read the script and decide for yourself. Rick D. @echo off rem Copyright (C) 2008 The Android Open Source Project rem rem Licensed under the Apache License, Version 2.0 (the License); rem you may not use this file except in compliance with the License. rem You may obtain a copy of the License at rem rem http://www.apache.org/licenses/LICENSE-2.0 rem rem Unless required by applicable law or agreed to in writing, software rem distributed under the License is distributed on an AS IS BASIS, rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. rem See the License for the specific language governing permissions and rem limitations under the License. rem don't modify the caller's environment setlocal rem Set up prog to be the path of this script, including following symlinks, rem and set up progdir to be the fully-qualified pathname of its directory. set prog=%~f0 rem Change current directory and drive to where the script is, to avoid rem issues with directories containing whitespaces. cd /d %~dp0 set jarfile=hierarchyviewer.jar set frameworkdir= set libdir= if exist %frameworkdir%%jarfile% goto JarFileOk set frameworkdir=lib\ if exist %frameworkdir%%jarfile% goto JarFileOk set frameworkdir=..\framework\ :JarFileOk set jarpath=%frameworkdir%%jarfile% call java -Xmx512m -Djava.ext.dirs=%frameworkdir% -Dhierarchyviewer.adb= -jar %jarpath% %* -- 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: How to get Latitude and longitude information
On Mon, Sep 13, 2010 at 11:39 AM, Gold thangadura...@gmail.com wrote: In my android application..after login the user has to send current position to server..! the button name currentLocation. if the user click the button current location , lattitude and longitude will be displayed in the text box as well as send to server None of that explains what you're having trouble with, nor did you answer the question of what you have working so far. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Disabling the USB port?
If I understand you correctly, if I turn off USB debugging, Even if I connect the phone via cable, I won't be able to run commands such as adb etc. Is this correct? If so, how is USB debugging turned off? Cheers, Earlence On Sep 13, 7:47 pm, Chris Stratton cs07...@gmail.com wrote: Compile a kernel without usb drivers. You will need root or an engineering bootloader to install it. Or you could just leave usb debugging off and decline to mount mass storage mode. Tez wrote: Is there any other way that can block the USB port so that no data is transferred? Where are the corresponding source files? Cheers, Earlence On Sep 13, 3:33 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Sep 13, 2010 at 3:44 AM, Tez earlencefe...@gmail.com wrote: Is it possible to disable the USB port? You could fill it with glue... Even if the device is physically connected to a host computer via USB cable, no logical connection should be established. What are the sources/programmatic way of doing this? You would need to modify the firmware. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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: AsyncTask doesn't run sometimes despite state returning RUNNING?
Thanks, I am trying to run it on the UI thread but via the Service. Have implemented a work around for now anyway and will re visit this when I have time to study and recode it properly. Thanks On Mon, Sep 13, 2010 at 5:32 PM, String sterling.ud...@googlemail.comwrote: Donal, I'm mildly surprised Mark Murphy hasn't chimed in on this himself, but here's a current post from his blog which looks relevant: http://commonsware.com/blog/2010/09/10/asynctask-screen-rotation.html HTH, String On Sep 13, 1:05 pm, Donal Rafferty draf...@gmail.com wrote: I have managed to implement the Task in my Service now but the original problem still remains. I dont cancel the Task at all in my service, I simply play the ringtone in the postExecute method of the Asynctask if a flag is true, if its not I dont. But I get the same issue, after a couple of runs the AsyncTask simply stops getting to the doInBackground method, only the postExecute method is run. Its very strange and really annoying me now. Is there any reason why an AsyncTask would behave like this without cancel being used? On Mon, Sep 13, 2010 at 10:58 AM, Donal Rafferty draf...@gmail.com wrote: Monday morning coding! :) I return my aidl definition in my service's onBind: @Override public IBinder onBind(Intent arg0) { Log.d(XXX, Status: onBind Called); return myServiceStub; } IBinder myServiceStub = new IMyService.Stub(){ //aidl methods }; And use this to call methods from my Activity, so I would need to be able to import android.media.Ringtone in my aidl definition but I cant. So I'm still stuck with it not working :( On Mon, Sep 13, 2010 at 10:32 AM, Kostya Vasilyev kmans...@gmail.com wrote: Donal, No, a service is a service, and a binder is a binder. The binder you get in the callback is the binder returned by the service's onBind. This example: http://developer.android.com/resources/samples/ApiDemos/src/com/examp. .. has a binder implementation that returns a reference to its service, so you can do this public void onServiceConnected(ComponentName className, IBinder binder) { LocalService.LocalBinder binder = (LocalService.LocalBinder) binder; *LocalService service = binder.getService();* } This example has one flaw: it leaks a service reference (since LocalBinder is a non-static inner class of LocalService). Using a static inner or a top-level class for LocalBinder, fixes that (AFAIK). -- Kostya 13.09.2010 13:16, Donal Rafferty пишет: 09-13 10:06:53.566: ERROR/AndroidRuntime(18791): Uncaught handler: thread main exiting due to uncaught exception 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): java.lang.ClassCastException: com.xxx.phone.MyService$1 09-13 10:06:53.676: ERROR/AndroidRuntime(18791): at com.xxx.phone.ui.MyActivity$2.onServiceConnected(MyActivity.java:515) So it doesn't like the cast from binder to Service? How can I fix that do you know? What am I missing from the example? -- Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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.comandroid-developers%2Bunsubs cr...@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.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] Re: How to get Latitude and longitude information
Hi.Treking..! I am include android.location I call the method getLongitude() as well as getLatitude () .. But I didnt get any value..! but i need to show current longitude and latitude information..! how i will achieve this..! Thanks in advance, Gold On Sep 13, 9:42 pm, TreKing treking...@gmail.com wrote: On Mon, Sep 13, 2010 at 11:39 AM, Gold thangadura...@gmail.com wrote: In my android application..after login the user has to send current position to server..! the button name currentLocation. if the user click the button current location , lattitude and longitude will be displayed in the text box as well as send to server None of that explains what you're having trouble with, nor did you answer the question of what you have working so far. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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] Setting desktop icon
I've got a line in my manifest that looks like this: application android:icon=@drawable/icon android:label=@string/ app_name android:debuggable=true But I see the default Android icon on the desktop instead of the one in drawable/icon. What else do I need to do? -- 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] Setting desktop icon
Try also putting it on your LAUNCHER activity. On Mon, Sep 13, 2010 at 1:04 PM, Bret Foreman bret.fore...@gmail.com wrote: I've got a line in my manifest that looks like this: application android:icon=@drawable/icon android:label=@string/ app_name android:debuggable=true But I see the default Android icon on the desktop instead of the one in drawable/icon. What else do I need to do? -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: How to get Latitude and longitude information
If your using an emulated device you are going to need to set up mock locations check out this link and follow the Andrews Link in the first answer http://stackoverflow.com/questions/2531317/android-mock-location-on-device Tommy Android Mobile Phone Application Developer Database Administrator .net Web Specialist -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Gold Sent: Monday, September 13, 2010 1:00 PM To: Android Developers Subject: [android-developers] Re: How to get Latitude and longitude information Hi.Treking..! I am include android.location I call the method getLongitude() as well as getLatitude () .. But I didnt get any value..! but i need to show current longitude and latitude information..! how i will achieve this..! Thanks in advance, Gold On Sep 13, 9:42 pm, TreKing treking...@gmail.com wrote: On Mon, Sep 13, 2010 at 11:39 AM, Gold thangadura...@gmail.com wrote: In my android application..after login the user has to send current position to server..! the button name currentLocation. if the user click the button current location , lattitude and longitude will be displayed in the text box as well as send to server None of that explains what you're having trouble with, nor did you answer the question of what you have working so far. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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 -- 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: Disabling the USB port?
On Mon, Sep 13, 2010 at 12:55 PM, Tez earlencefe...@gmail.com wrote: If I understand you correctly, if I turn off USB debugging, Even if I connect the phone via cable, I won't be able to run commands such as adb etc. Is this correct? Yes. If so, how is USB debugging turned off? The user turns it off via the appropriate settings screen. I don't see where it is exposed via Settings.System, or even Settings.Secure. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- 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: How to get Latitude and longitude information
On Mon, Sep 13, 2010 at 12:00 PM, Gold thangadura...@gmail.com wrote: I am include android.location OK. That's not really useful information. I call the method getLongitude() as well as getLatitude () On *what*? .. But I didnt get any value..! What does that mean? 0? Null? An exception? At this point, I'm going to direct you here http://tinyurl.com/35ud8mt. If that does not help you, then you have to go herehttp://www.catb.org/esr/faqs/smart-questions.htmland read very carefully and then come back when you're ready. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: Disabling the USB port?
Tez, do you work for ATT? On Sep 13, 12:35 pm, Mark Murphy mmur...@commonsware.com wrote: On Mon, Sep 13, 2010 at 12:55 PM, Tez earlencefe...@gmail.com wrote: If I understand you correctly, if I turn off USB debugging, Even if I connect the phone via cable, I won't be able to run commands such as adb etc. Is this correct? Yes. If so, how is USB debugging turned off? The user turns it off via the appropriate settings screen. I don't see where it is exposed via Settings.System, or even Settings.Secure. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- 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: How to get Latitude and longitude information
Hi..Treking, I will tell the simply way..! I need current longitude and lattitude values..! How can i get...! Please..! Thanks in advance, Gold On Sep 13, 10:35 pm, TreKing treking...@gmail.com wrote: On Mon, Sep 13, 2010 at 12:00 PM, Gold thangadura...@gmail.com wrote: I am include android.location OK. That's not really useful information. I call the method getLongitude() as well as getLatitude () On *what*? .. But I didnt get any value..! What does that mean? 0? Null? An exception? At this point, I'm going to direct you here http://tinyurl.com/35ud8mt. If that does not help you, then you have to go herehttp://www.catb.org/esr/faqs/smart-questions.htmland read very carefully and then come back when you're ready. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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: How to get Latitude and longitude information
On Mon, Sep 13, 2010 at 12:49 PM, Gold thangadura...@gmail.com wrote: How can i get...! Once again... On Mon, Sep 13, 2010 at 12:35 PM, TreKing treking...@gmail.com wrote: At this point, I'm going to direct you here http://tinyurl.com/35ud8mt. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- 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