[android-developers] Re: systrace error
Have you seen thishttp://stackoverflow.com/questions/11300773/error-running-systrace-tool-in-adb-using-a-jelly-bean-4-1-emulator-on-windows-7? It sounds like the script doesn't play nice on Windows...but that seems like too obvious of an error to go overlooked. Either way, running it in Linux is a good way to sidestep the issue. On Tuesday, July 3, 2012 9:25:55 PM UTC-4, jlum wrote: I'm having problems getting systrace to work on Windows7 64-bit. I have Python 2.7 64-bit installed on my PC. I have enabled tracing through Settings Developer options Monitoring Enable traces. Here's the output from Command Prompt: C:\Android SDK\android-sdk_r07-windows\android-sdk-windows\tools \systracesystrace.py Traceback (most recent call last): File C:\Android SDK\android-sdk_r07-windows\android-sdk-windows \tools\systrace\systrace.py, line 212, in module main() File C:\Android SDK\android-sdk_r07-windows\android-sdk-windows \tools\systrace\systrace.py, line 124, in main ready = select.select([adb.stdout, adb.stderr], [], [adb.stdout, adb.stderr]) select.error: (10093, 'Either the application has not called WSAStartup, or WSAStartup failed') Any ideas? 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] Power on Galaxy Nexus via USB
Is it possible to turn on a Nexus from the USB port? I'm developing a device which will have a sort of docking station for the Nexus, and I'd like to power it on with a single button to boot both the dock and the phone. I've noticed that if the phone is off and it gets plugged into a power source, the screen turns on. That leads me to believe there's some decision being made as to what should get powered on at that time. Could a change in firmware to the power management chip modify that behavior to power on the entire phone? This http://www.ifixit.com/Teardown/Samsung-Galaxy-Nexus-Teardown/7182/2leads me to believe that the chip in question is the Texas Instruments TWL6030http://www.ti.com/product/twl6030 Fully Integrated Power Management with Switch Mode Charger. Thanks, Todd -- 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: conversion to dalvik format failed error 1
I've seen this happen from time to time in Eclipse. It's not a code issue. I would recommend trying a few things: 1. Make sure you have the right SDK version and APIs included in your project. Sometimes Eclipse will change these on you. Once or twice when seeing this error, I've had to change to another SDK version, do a clean build, change back to my original SDK version, and then do another clean build. 2. Do a clean build 3. Reboot Eclipse 4. If none of those work, you might need to rebuild your environment. (Maybe there's a better way to deal with the issue, but this will almost certainly work.) So that means you've got to remove the Android SDK(s) entirely, and re-download them. Then you'll have to re- select the right SDK version for your project and rebuild. I hope this helps! On Feb 29, 2:37 am, rajesh rogueraje...@gmail.com wrote: Hi all, How can i overcome the following error Dx 1 error; aborting Conversion to Dalvik format failed with error 1 -- 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: Custom IME for custom component
I did have another thought about this, which I think is a dead end: Would it be possible to have the app change the IME on the fly as the control gains focus? I noticed InputMethodManager:setInputMethod(), but I haven't seen any examples of its use. And then I saw a post by Dianne Hackborn saying that it's specifically not allowed to programmatically change the IME - which makes a lot of sense from a security perspective. I'm just shocked that there's no way to essentially bundle an IME with a custom control. I must be missing something, right? It seems like I'm left to create the IME from scratch using AlertDialog.Builder, so some similar construct. On Feb 27, 4:29 pm, Todd Sjolander guyfantas...@gmail.com wrote: Hi, I'm looking to have a custom component (an extended EditText) that uses its own input method. I've created the input method and the custom component without issues, but I'm having trouble getting the component to use the input method. I can use the input method with the component if I use it as the default IME for the system...but I only want to use it for this component type, not everything in the system, or even everything in the app. In particular, if I specify the android:inputMethod in the XML when laying out the component, it can't find the class when it loads the component: com.test.z800h.display.control.ValidatedNumber ... android:inputMethod=com.test.z800h/.Z800HInput ... / leads to: 08-01 19:55:45.620: E/AndroidRuntime(5059): Caused by: java.lang.ClassNotFoundException: com.test.z800h/.Z800HInput I've also tried com.test.z800h.input.Z800HInput and com.test.z800h/ input.Z800HInput. The fully qualified class name is com.test.z800h.input.Z800HInput. This is strange, because this code works: Class? c; try { c = Class.forName(com.test.z800h.input.Z800HInput); } catch (ClassNotFoundException ex) { throw new RuntimeException(ex); } Maybe TextView uses a different class loader that doesn't index the app's package. Of course, I know android:inputMethod is deprecated. From what I can tell, there really isn't another way to specify an exact input method for a control. I'd be happy to do it in a non-deprecated way if there is one. Thanks, ToddSjolander -- 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 IME for custom component
Hi, I'm looking to have a custom component (an extended EditText) that uses its own input method. I've created the input method and the custom component without issues, but I'm having trouble getting the component to use the input method. I can use the input method with the component if I use it as the default IME for the system...but I only want to use it for this component type, not everything in the system, or even everything in the app. In particular, if I specify the android:inputMethod in the XML when laying out the component, it can't find the class when it loads the component: com.test.z800h.display.control.ValidatedNumber ... android:inputMethod=com.test.z800h/.Z800HInput ... / leads to: 08-01 19:55:45.620: E/AndroidRuntime(5059): Caused by: java.lang.ClassNotFoundException: com.test.z800h/.Z800HInput I've also tried com.test.z800h.input.Z800HInput and com.test.z800h/ input.Z800HInput. The fully qualified class name is com.test.z800h.input.Z800HInput. This is strange, because this code works: Class? c; try { c = Class.forName(com.test.z800h.input.Z800HInput); } catch (ClassNotFoundException ex) { throw new RuntimeException(ex); } Maybe TextView uses a different class loader that doesn't index the app's package. Of course, I know android:inputMethod is deprecated. From what I can tell, there really isn't another way to specify an exact input method for a control. I'd be happy to do it in a non-deprecated way if there is one. Thanks, Todd Sjolander -- 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 service always alive..
If you absolutely need it to be running all the time, you need to acquire a PARTIAL_WAKE_LOCK via PowerManager. This will keep the CPU on all the time, and your program running. Be prepared for a shocking decline in battery life. I assume your next question will be How do I make it run as soon as the phone boots? For that, you'll need to implement a BroadcastReceiver that catches android.intent.action.BOOT_COMPLETED. Your receiver would then launch your service. Once the service starts, you get the wakelock described above, and voila - you're always running. BTW, you'll need to declare permissions for both of those things. Good luck! Todd Sjolander On Jun 30, 7:34 am, M.Manjunatha man...@gmail.com wrote: Hi, How do I make my service always alive?? If my service gets killed because of an exception or if the VM kills my service on low memory, How do I make sure that my service is always running? --~--~-~--~~~---~--~~ 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: Able to use T-Mobile G1 without contract for application testing?
There is a charge for the plan on my phone, but it's outdated, and I don't think it's available anymore. On Jun 9, 10:35 pm, tgustafson tommygustaf...@gmail.com wrote: Hi Todd, Thank you very much for the reply. Is there a charge for the wifi- only data plan? I will be using this solely to develop and will always be covered by wifi coverage. Cheers, Tom On Jun 9, 7:16 am, Todd Sjolander guyfantas...@gmail.com wrote: I'm using a G1 with the old non-Android (read: Wifi only) data plan. The only downside that I've seen is the loss of connectivity outside of your Wifi networks. But if you're developing from inside a wireless network, it makes no difference. You can still buy apps on the market, and use all the usual network-based software. Todd Sjolander On Jun 9, 1:55 am, tgustafson tommygustaf...@gmail.com wrote: Hi John, Thanks for the tip, they look like they are quite expensive unfortunately given the low supply. Have you had any experience with developers using a generic t-mobile G1 phone for development without data plan? Cheers, Tom On Jun 8, 10:12 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: There are a few of the unlocked HTC Magic phones available on eBay. These are the ones given out at the Google IO conference that will work without a SIM or on any capable network. Search eBay for Google IO and you'll find them. Nice phones, I wouldn't part with mine for anything. -John Coryat http://maps.huge.info http://www.usnaviguide.com http://www.zipmap.net --~--~-~--~~~---~--~~ 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: Unlocking screen after wake lock
What a coincidence! I just figured this out yesterday: KeyguardManager km = (KeyguardManager) getSystemService (KEYGUARD_SERVICE); KeyguardManager.KeyguardLock keylock = km.newKeyguardLock(Your label here); keylock.disableKeyguard(); Todd Sjolander On Jun 9, 12:16 pm, mobilek...@googlemail.com mobilek...@googlemail.com wrote: Hi, My app requires alerts at certain events, which are very likely to happen while the screen is off. It captures those event perfectly, however, I'm struggling to hide the T-Mobile screen lock after I've acquired wake lock from the PowerManager. I've tried broadcasting Intent.ACTION_CLOSE_SYSTEM_DIALOGS, however, that seems not to work. Any ideas of how to fix that? 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: Able to use T-Mobile G1 without contract for application testing?
I'm using a G1 with the old non-Android (read: Wifi only) data plan. The only downside that I've seen is the loss of connectivity outside of your Wifi networks. But if you're developing from inside a wireless network, it makes no difference. You can still buy apps on the market, and use all the usual network-based software. Todd Sjolander On Jun 9, 1:55 am, tgustafson tommygustaf...@gmail.com wrote: Hi John, Thanks for the tip, they look like they are quite expensive unfortunately given the low supply. Have you had any experience with developers using a generic t-mobile G1 phone for development without data plan? Cheers, Tom On Jun 8, 10:12 pm, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: There are a few of the unlocked HTC Magic phones available on eBay. These are the ones given out at the Google IO conference that will work without a SIM or on any capable network. Search eBay for Google IO and you'll find them. Nice phones, I wouldn't part with mine for anything. -John Coryat http://maps.huge.info http://www.usnaviguide.com http://www.zipmap.net --~--~-~--~~~---~--~~ 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: java.lang.VerifyError
That error happens when the dalvik VM loads a class into memory. If you look into the log, you can find exactly what class is causing the problem. I had that problem recently and found that android.text.format.Time doesn't load for me. I think the only way around it is to avoid using the class. For me, it was easy to avoid. You may not have such good luck, I'm sorry to say. Todd Sjolander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Problem with SDK 1.5
Your MyListener class is correct. The problem is in your call to registerListener(). That's an overloaded method. The one you're calling is the old one that still takes the deprecated class. Here's the new signature: registerListener(SensorEventListener listener, Sensor sensor, int rate, Handler handler); On May 7, 11:00 am, doubleslash doublesl...@gmail.com wrote: I recently installed SDK 1.5 and updated the Eclipse adt to 0.9. I tried using the accelerometer sensor but kept getting an error when registerring the listener. My code is as follows: class myActivity extends Activity{ SensorManager sm = (SensorManager)getSystemService (Context.SENSOR_SERVICE); sm.registerListener(new MyListener(), Sensor.TYPE_ACCELEROMETER, SensorManager.SENSOR_DELAY_UI); class MyListener implements SensorEventListener{ // implementation is irrelevant } } I keep getting the error that I should change MyListener to type SensorListener, which has been replaced by SensorEventListener in the new SDK. I chose to compile my code against Android 1.5. It seems that I have successfully set up the new SDK as it can find the new interface SensorEventListener. Why does registerListener require an interface that has been deprecated? --~--~-~--~~~---~--~~ 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: Restarting a service.
As I understand it, if your Service (or Activity, for that matter), dies due to the system reclaiming resources or a crash, the OS will restart it for you automatically. That means if you were to configure it to start upon boot (using android.permission.RECEIVE_BOOT_COMPLETED and implementing a receiver that handles android.intent.action.BOOT_COMPLETED), you could be pretty certain that your service is always running...once the user restarts the phone after installation. Or if you have some kind of user interface for the product (can't see how you wouldn't!), it could start the service if it isn't already running. Then there wouldn't be a restart needed. Todd Sjolander On Apr 29, 8:44 am, M.Manjunatha man...@gmail.com wrote: Hi Folks, How do I restart my service automatically when my service gets killed or crashes, until and unless I myself deregister the service. public class Myservice extends Service { public void Myservice(){ } public void onStart(Intent intent, int startId) { } } Regards, Manjunatha --~--~-~--~~~---~--~~ 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] finish() not killing Activity
Hello, I've got an application that has (among other things) three Activities, let's call them A, B, and C. A is the main navigation point for the entire application, and launches B and C directly using startActivity(). They work fine that way. However, when I call C from inside B, I get a strange problem. The code for launching Activity C is exactly the same in both places. The problem is the hardware back button. In the emulator, it takes two presses of the back button in order to close Activity C and come back to B. On a G1, it takes 3 or 4 presses. Upon seeing this, I implemented the usual suspects in C - onPause(), onStop(), and onDestroy(), and onResume() in B. When I press the back button from C and it doesn't work, I get onPause(), onStop(), onDestroy () - in that order, but nothing happens. When it works (on press 3 or 4 on the G1), I get onPause(), then onResume() in B, then onStop() and onDestroy(). I've tried catching the key press of the back button and calling finish (), but that doesn't make a difference. Has anyone seen this? To pre-empt some questions: All C does is display some data. There are no threads or any other special resources that C might have an active handle to that's preventing it from closing. But out of curiosity, if it did, how would I detect that? Any ideas for further diagnostics here? I'm out of ideas. 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: finish() not killing Activity
Marco, your hunch was right. I was somehow creating multiple copies of Activity C. In case anyone can benefit from this, let me explain how it went wrong. I implemented onTouch() in Activity B, which would create an Intent for Activity C, and then call startActivity(). For some reason, onTouch() would get called multiple times with each touch, launching a new Activity C each time. Jon, I've seen some oddities from that myself, although I can't really make sense of it. But it's helpful to keep that in mind. 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: Accessing System Brightness
Ah, that makes sense. Thank you. On Apr 8, 4:45 pm, Dianne Hackborn hack...@android.com wrote: It will only modify the screen while that window/activity is being shown to the user. This allows it to be done in a safe way (no permission required) which the system can recover from if there is a bug in the application (or if the application gets killed for some reason, as we tend to do). -- 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: Accessing System Brightness
Dianne, Is there a new way to do this in Cupcake, or is the functionality being removed? On Mar 23, 1:37 pm, Dianne Hackborn hack...@android.com wrote: This is a private API and will break in Cupcake. -- Dianne Hackborn Android framework engineer hack...@android.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: I want run my application in background, with Service component
The original code I used came from the SDK sample code. Specifically, look in ...\samples\ApiDemos\src\com\example\android\apis\app. There are a lot of different capabilities demonstrated there, and the ones you want are in RemoteService.java, RemoteServiceBinding.java, RemoteServiceController.java. The commenting is pretty good, so it shouldn't take much time to piece it all together. On Apr 4, 7:43 am, jj jagtap...@gmail.com wrote: Thank you for reply can you just send me the tutorial link, what u mentioned in first paragraph Or any other related tut link. 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: I want run my application in background, with Service component
Using a Notification is one way to go about it. The Notification can be linked to an Activity, which gets launched if the user clicks on the Notification. Here's some code, which I think I pulled from some tutorial someplace: CharSequence text = getText(R.string.remote_service_started); // Set the icon, scrolling text and timestamp Notification notification = new Notification(R.drawable.icon, text, System.currentTimeMillis()); // The PendingIntent to launch our activity if the user selects this notification PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MyActivity.class), 0); // Set the info for the views that show in the notification panel. notification.setLatestEventInfo(this, getText (R.string.remote_service_label), text, contentIntent); // Send the notification. // We use a string id because it is a unique number. We use it later to cancel. mNM.notify(R.string.remote_service_started, notification); Good luck! On Apr 3, 5:03 am, jj jagtap...@gmail.com wrote: Hello I want run my application in background, with Service component, If the application is running in background then there should be icon of application, so when user click on icon the application should come in fore ground. Is this possible in Android, anybody having suggestions plz welcome. There is provision of Notification Manager for icon, but it is not reacting to user events. Is there any other way to this. 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.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---