[android-developers] how to add a new method in framework
Hi all, For some reason I need to add a new public method in Canvas.java just as bellow: /** * */ public Bitmap getBitmap() { if (mBitmap != null) { return mBitmap; } else { return null; } } After that I make update-api, then make successfully. the problem is when I develop in eclipse, the eclipse won't recognize the new getBitmap method and won't get apk build. Is there anything else I should do to let eclipse work with the new method? Thx in advanc. Shawn -- 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 add a new method in framework
Do not add new public APIs this way. This is fine if you want to contribute changes to the Android Open Source Project (and if they are accepted of course) but if it's for your own version of the platform, you should just make the method public and use the @hide javadoc tag so that you don't need make update-api. On Mon, Jan 25, 2010 at 12:13 AM, sheng wang banxia...@gmail.com wrote: Hi all, For some reason I need to add a new public method in Canvas.java just as bellow: /** * */ public Bitmap getBitmap() { if (mBitmap != null) { return mBitmap; } else { return null; } } After that I make update-api, then make successfully. the problem is when I develop in eclipse, the eclipse won't recognize the new getBitmap method and won't get apk build. Is there anything else I should do to let eclipse work with the new method? Thx in advanc. Shawn -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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] How can I get system log?
I'm write some code using iptables's LOG target. It said I can find these log in system log, and I do find them in dmesg. My question is: is there a convenient way to access these log? Or every time I should exec the dmesg command and roll to the end of the buffer to get the last log line. Any suggestion is welcome. 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] cocos2d for Android Update
The new update fixes a slew of issues: parallax is working, rendering issues on G1 phones, and handles menus and sprites correctly. The touch event handler has been updated to use a singleton class with delegates. Thanks to Andrey who pointed out a couple of issues with rendering on his phone and sent me a fix for it. Most transitions are also working. Menus are also working except for a problem with MenuToggle that should be fixed in the next release. The next step is to have particle system working (fire is starting to work in the demo.) Someone also offered to work on adding Box2D/ chipmunk to the lot. . Thanks to everyone who sent me mail with some suggestions and contributions. I really appreciate all the help I can get to make this project usable and useful. Thanks! Philip -- 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: emulator not getting launched with 2.1 platform
increase your devices's hardware configuration, something of the order greater than system image, try 512MB (when you create the emulator instance using AVD) On Jan 25, 9:27 am, prachi prachi.tya...@wipro.com wrote: Hi all I have updated my android sdk to 2.1 version and was trying to build one application on that target.My application was bulid properly bt i am unable to launch tha emulator with the target 2.1. Its showing the message as:- System image file too large for device's hardware configuration 74MB 72MB. Please help me out. -- 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] System not terminating my process
When I navigate away from my application - I don't have an activities open - and my background service has been shut down (validated that service's onDestroy method was called). However my process seems to hand around and the system never seems to get around to killing my process. Is there any way I can debug why the system is not killing my process. -thanks, Sandeep. -- 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] MotionEvent ACTION_DOWN throwing security exception for INJECT_EVENT permission
Hi, I have added this line in my androidManifest.xml uses-permission android:name=android.permission.INJECT_EVENT/ I am trying to execute following code, long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); Instrumentation inst = new Instrumentation(); MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0); Log.d( LOG_TAG,injecting motion event down ); *inst.sendPointerSync(event); //wm.injectPointerEvent( event,true );* Both above lines are throwing exception W/System.err( 762): java.lang.SecurityException: Injecting to another application requires INJECT_EVENT permission. Do we need anything else too to get it working ? Thanks in advance -- 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: StackOverflowError on drawing Spannable string
for some reason the append caused this issue. replacing it with setText() solved the issue. On Jan 24, 6:00 pm, Rimma Sukhovsky drim...@gmail.com wrote: I have a listView which contains TextViews. I append to it several strings, and some of them are linkified. SpannableString str = SpannableString.valueOf(text); str.setSpan(new URLSpan(url), 0, text.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE); textView.append(str); For some reason, when i compile it for sdk 1.1 it works fine, but on sdk 1.5 devices (like Galaxy) it crashes with the following error. Any ideas why? 01-24 15:05:54.915: INFO/dalvikvm(687): Stack overflow, expanding (0x41048200 to 0x41048000) 01-24 15:05:54.915: INFO/dalvikvm(687): Shrank stack (to 0x41048200, curFrame is 0x41049cd8) 01-24 15:05:54.925: DEBUG/AndroidRuntime(687): Shutting down VM 01-24 15:05:54.925: WARN/dalvikvm(687): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) 01-24 15:05:54.925: ERROR/AndroidRuntime(687): Uncaught handler: thread main exiting due to uncaught exception 01-24 15:05:55.014: DEBUG/dalvikvm(687): GC freed 5881 objects / 487464 bytes in 67ms 01-24 15:05:55.014: ERROR/AndroidRuntime(687): java.lang.StackOverflowError 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.text.SpannableStringBuilder.drawText (SpannableStringBuilder.java:1042) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.graphics.Canvas.drawText(Canvas.java:1273) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.text.Styled.each(Styled.java:119) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.text.Styled.foreach(Styled.java:249) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.text.Styled.drawText(Styled.java:302) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.text.Layout.drawText(Layout.java:1346) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.text.Layout.draw(Layout.java:339) 01-24 15:05:55.014: ERROR/AndroidRuntime(687): at android.widget.TextView.onDraw(TextView.java:3921) -- 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 upgrade OS in Google I/O Device to Android 2.1
Hi, How to upgrade OS in Google I/O Device to Android 2.1. Please let me know if you have any reference. I will read and do it. Thanks, Ravindra -- 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: Loop audio from mic to earpiece?
Hi Ani, I am working on 1.5 (CupCake) and have tried to use the setRouting method, however the audio still appears to be coming out of the speaker. I also have an eclair device and the audio is coming out of the speaker on that device too. I have tried using the Audiomanager and the STREAM_VOICE_CALL also but with no luck at all. My code is posted above in case I may be using the methods the wrong way? On Mon, Jan 25, 2010 at 3:09 AM, ani anish198519851...@gmail.com wrote: Not 100% sure about the earpiece, but you specify a stream when you create the AudioTrack and I think a stream encpsulates audio routing and volume amongst possibly other things. If you set the stream to STREAM_VOICE_CALL it might come through the earpiece as this is where a call would be routed, although I guess that depends on headsets and stuff. Can anyone clarify if I am right? As for earpiece routing we can route audio to earpiece using setrouting call in the case of cupcake.In case of ECLAIR you can use various custom api's provided by android to route it to earpiece (google it).You need to set the route explicitly to get the audio out of earpiece or any other place.STREAM_VOICE_CALL will work i think but not 100% sure.Please check in case you are not getting let me 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.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] how to add a new method in framework
Hi Romain, thanks for ur replay. I totally agree with you that the @hide will be the better way. But I don't think the @hide really solve my question. I guess I don't make it quite clear. The scenario is : 1. I have my eclipse and sdk installed on my PC (windows xp) 2. The android source tree stays in vmware (Ubuntu), the make also happens here. The question block me is: After I add some new method in framework, the process of make is fine. After that , I copy all 3 img file in mydroid/out/target/product/generic from Ubuntu to my windows SDK directory , overwrite the exists files. When I coding in eclipse, the IDE seems have no idea of the new method that I have add. The new added method will be treated as syntax error. So no apk will be created. I guess there are something more that I should do to let my eclipse recognize my new method. Give me a hand~ 2010/1/25 Romain Guy romain...@android.com Do not add new public APIs this way. This is fine if you want to contribute changes to the Android Open Source Project (and if they are accepted of course) but if it's for your own version of the platform, you should just make the method public and use the @hide javadoc tag so that you don't need make update-api. On Mon, Jan 25, 2010 at 12:13 AM, sheng wang banxia...@gmail.com wrote: Hi all, For some reason I need to add a new public method in Canvas.java just as bellow: /** * */ public Bitmap getBitmap() { if (mBitmap != null) { return mBitmap; } else { return null; } } After that I make update-api, then make successfully. the problem is when I develop in eclipse, the eclipse won't recognize the new getBitmap method and won't get apk build. Is there anything else I should do to let eclipse work with the new method? Thx in advanc. Shawn -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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.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] how to add a new method in framework
You have to build a new SDK to use new public APIs, but again that's not what you should be doing. On Mon, Jan 25, 2010 at 1:22 AM, sheng wang banxia...@gmail.com wrote: Hi Romain, thanks for ur replay. I totally agree with you that the @hide will be the better way. But I don't think the @hide really solve my question. I guess I don't make it quite clear. The scenario is : 1. I have my eclipse and sdk installed on my PC (windows xp) 2. The android source tree stays in vmware (Ubuntu), the make also happens here. The question block me is: After I add some new method in framework, the process of make is fine. After that , I copy all 3 img file in mydroid/out/target/product/generic from Ubuntu to my windows SDK directory , overwrite the exists files. When I coding in eclipse, the IDE seems have no idea of the new method that I have add. The new added method will be treated as syntax error. So no apk will be created. I guess there are something more that I should do to let my eclipse recognize my new method. Give me a hand~ 2010/1/25 Romain Guy romain...@android.com Do not add new public APIs this way. This is fine if you want to contribute changes to the Android Open Source Project (and if they are accepted of course) but if it's for your own version of the platform, you should just make the method public and use the @hide javadoc tag so that you don't need make update-api. On Mon, Jan 25, 2010 at 12:13 AM, sheng wang banxia...@gmail.com wrote: Hi all, For some reason I need to add a new public method in Canvas.java just as bellow: /** * */ public Bitmap getBitmap() { if (mBitmap != null) { return mBitmap; } else { return null; } } After that I make update-api, then make successfully. the problem is when I develop in eclipse, the eclipse won't recognize the new getBitmap method and won't get apk build. Is there anything else I should do to let eclipse work with the new method? Thx in advanc. Shawn -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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 -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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
Re: [android-developers] Re: Cant get data from my service
Hi WoodManEXP, It turned out in the end I just hadn't binded the service properly to the activity Like this: Intent i = new Intent(); i.setClassName(team.org, team.org.WIFIService); bindService(i, this, Context.BIND_AUTO_CREATE); On Sun, Jan 24, 2010 at 10:51 PM, WoodManEXP woodman...@gmail.com wrote: Daffo0, I would like to know how you solve this because I have a similar need with a background service doing a job and the background service would like to push updates to an activity (if the activity is running). What are the preferred communication techniques between Service and Activities? You are using IRemoteInterface class. What about IBinder? Have you looked at that? On Jan 19, 12:44 pm, draf...@gmail.com draf...@gmail.com wrote: I have aservicethat is running fine and I can see the data collecting in the logcat, However after creating an aidl and trying to get the information from theserviceto my main activity I have hit a problem. I just cant seem to get the data to pass across at all, I always get a null pointer exception. Here is myserviceclass, I want to get the connectedLevel int to use in my activity class. Is it because I'm not binding properly or what am I missing but any calls to the remote interface to try and get the data ends up with a null pointer exception. My activity class code is posted underneath. Serviceclass public class WIFIService extendsService{ private static final int WIFI_NOTIFY = 0x2001; public static final String EXTRA_UPDATE_RATE = update-rate; public static final String WIFI_SERVICE = cicero.org.WIFIService.SERVICE; private WifiManager mainWifi; private BroadcastReceiver rssiListener = null; private int updateRate = -1; private int connectedLevel; @Override public void onCreate(){ super.onCreate(); mainWifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); notifier = (NotificationManager) getSystemService (Context.NOTIFICATION_SERVICE); } @Override public void onStart(Intent intent, int startId){ super.onStart(intent, startId); updateRate = intent.getIntExtra(EXTRA_UPDATE_RATE, -1); if(updateRate == -1){ updateRate = 6; } rssiListener = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(WifiManager.RSSI_CHANGED_ACTION.equals(action)) { WifiInfo data = mainWifi.getConnectionInfo(); Log.d(WIFISERVICE, RSSI has changed); if(mainWifi.getConnectionInfo()!=null){ setConnectedLevel(data.getRssi()); Log.d(WIFISERVICE, new RSSI = + data.getSSID()+ + data.getRssi() + dBm); } } } }; } @Override public void onDestroy(){ if(rssiListener != null){ unregisterReceiver(rssiListener); rssiListener = null; } if(wifiChangeListener != null){ unregisterReceiver(wifiChangeListener); wifiChangeListener = null; } if(receiverWifi != null){ unregisterReceiver(receiverWifi); receiverWifi = null; } super.onDestroy(); } public void setConnectedLevel(int connectedLevel) { this.connectedLevel = connectedLevel; } @Override public IBinder onBind(Intent intent) { // we only have one, so no need to check the intent return mRemoteInterfaceBinder; } // remote interface private final IRemoteInterface.Stub mRemoteInterfaceBinder = new IRemoteInterface.Stub() { @Override public int getConnectedLevel() throws RemoteException { Log.v(interface, getConnectedLevel() called); return connectedLevel; } }; } Activity class public class TestApp extends Activity implements ServiceConnection{ IRemoteInterface mRemoteInterface = null; int connectedLevel; /** Called when the activity is first created. */
[android-developers] DisplayMetrics xdpi and ydpi returning incorrect values
Hi, xdpi and ydpi are currently returning 96 on a Motodola Droid device. screenDPI returns a stepped value of 240, which still isn't the correct value. This issue was also present much earlier (pre-cupcake) - http://groups.google.com/group/android-developers/browse_thread/thread/72ad6ba7683a6b80 Is this a known bug? Is this expected to be fixed soon? Given the varying pixel densities of devices that are coming up, having a way to obtain accurate screen DPI is essential. Thanks, Ashutosh -- 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] DisplayMetrics xdpi and ydpi returning incorrect values
This is a known bug. Although screenDPI=240 is the correct value (it's not the real density of the display, but the density used by the OS for that screen.) On Mon, Jan 25, 2010 at 1:37 AM, Ashutosh Sharma ashusha...@gmail.com wrote: Hi, xdpi and ydpi are currently returning 96 on a Motodola Droid device. screenDPI returns a stepped value of 240, which still isn't the correct value. This issue was also present much earlier (pre-cupcake) - http://groups.google.com/group/android-developers/browse_thread/thread/72ad6ba7683a6b80 Is this a known bug? Is this expected to be fixed soon? Given the varying pixel densities of devices that are coming up, having a way to obtain accurate screen DPI is essential. Thanks, Ashutosh -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: Simple question... how do I open the browser?
thanks On Jan 25, 11:32 am, Breezy mbre...@gmail.com wrote: Got it figured out... The word I was missing in the search was intent. After seeing that word around more and more I used that and came across this... http://groups.google.com/group/android-developers/browse_thread/threa... Which said to use this... Intent i = new Intent(Intent.VIEW_ACTION, Uri.parse(http://www.cnn.com;)); startActivity(i); For future refence in case someone is looking for it. On Jan 24, 8:59 pm, Breezy mbre...@gmail.com wrote: When a user clicks the about button in my app's menu I want it to open the browser and go to a specific webpage... Is there like a one- liner out there somewhere to do this? Seems simple but Google is not being helpful right now - or I'm just searching the wrong thing. 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: DisplayMetrics xdpi and ydpi returning incorrect values
Is it then true that the OS works only in the stepped values of 120, 160 and 240? Also, any idea if xdpi and ydpi would be fixed anytime soon? Or if some APIs would allow us to query the physical dimensions of the screen? Thanks, Ashutosh On Jan 25, 2:39 pm, Romain Guy romain...@android.com wrote: This is a known bug. Although screenDPI=240 is the correct value (it's not the real density of the display, but the density used by the OS for that screen.) On Mon, Jan 25, 2010 at 1:37 AM, Ashutosh Sharma ashusha...@gmail.com wrote: Hi, xdpi and ydpi are currently returning 96 on a Motodola Droid device. screenDPI returns a stepped value of 240, which still isn't the correct value. This issue was also present much earlier (pre-cupcake) -http://groups.google.com/group/android-developers/browse_thread/threa... Is this a known bug? Is this expected to be fixed soon? Given the varying pixel densities of devices that are coming up, having a way to obtain accurate screen DPI is essential. Thanks, Ashutosh -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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
Re: [android-developers] Re: DisplayMetrics xdpi and ydpi returning incorrect values
Is it then true that the OS works only in the stepped values of 120, 160 and 240? Yes indeed. Also, any idea if xdpi and ydpi would be fixed anytime soon? Or if some APIs would allow us to query the physical dimensions of the screen? In a future version of Android. Note that this issue is specific to Droid. Thanks, Ashutosh On Jan 25, 2:39 pm, Romain Guy romain...@android.com wrote: This is a known bug. Although screenDPI=240 is the correct value (it's not the real density of the display, but the density used by the OS for that screen.) On Mon, Jan 25, 2010 at 1:37 AM, Ashutosh Sharma ashusha...@gmail.com wrote: Hi, xdpi and ydpi are currently returning 96 on a Motodola Droid device. screenDPI returns a stepped value of 240, which still isn't the correct value. This issue was also present much earlier (pre-cupcake) -http://groups.google.com/group/android-developers/browse_thread/threa... Is this a known bug? Is this expected to be fixed soon? Given the varying pixel densities of devices that are coming up, having a way to obtain accurate screen DPI is essential. Thanks, Ashutosh -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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
Re: [android-developers] cocos2d for Android Update
This is really an incredible effort. Is there any application on android market that is using this engine? Thanks -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ On Mon, Jan 25, 2010 at 1:44 PM, Philip philip.dese...@gmail.com wrote: The new update fixes a slew of issues: parallax is working, rendering issues on G1 phones, and handles menus and sprites correctly. The touch event handler has been updated to use a singleton class with delegates. Thanks to Andrey who pointed out a couple of issues with rendering on his phone and sent me a fix for it. Most transitions are also working. Menus are also working except for a problem with MenuToggle that should be fixed in the next release. The next step is to have particle system working (fire is starting to work in the demo.) Someone also offered to work on adding Box2D/ chipmunk to the lot. . Thanks to everyone who sent me mail with some suggestions and contributions. I really appreciate all the help I can get to make this project usable and useful. Thanks! Philip -- 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: HttpServerConnection
Then whats for the class HttpServerConnection is there in the sdk ? regards On Jan 24, 3:52 pm, Jags jag...@gmail.com wrote: i see, it is apache, can we use it freely for commerical apps ? if i want to deploy an app of my choice, i will have to write a servelet and publish in jetty server, right ? regards On Jan 24, 10:36 am, lucky4me bakhtiyo...@gmail.com wrote: Seehttp://code.google.com/p/i-jetty/ On Jan 24, 10:27 am, Jags jag...@gmail.com wrote: ah, these are the apis for hitting a url and get some info and post data to from m android device, is not it ? I wanna a small http server running on my android device [may be as a service] and hosting small http pages browsable from my PC. for example if my android device is connected to wifi and gets a ip 192.169.2.3 i can hithttp://192.168.2.3inpcbrowser connected to same network and get a welcome page :) i know running a web server in a mobile device is weird, but it is just for curiosity purposes, also my minimal server should be able to receive get post requests from the browsrs, i hope i am more clearer now regards On Jan 24, 4:11 am, Brion Emde brione2...@gmail.com wrote: I don't know exactly what you are talking about. The full Apache HttpClient library is present, as well as the Java equivalent. Take a look at the Apache DefaultHttpClient here:http://developer.android.com/reference/org/apache/http/impl/client/pa... Also there is HttpGet and HttpPost and so on are all defined here: http://developer.android.com/reference/org/apache/http/client/methods... There are many examples of using these objects on the internet and in this group. On Jan 23, 8:39 am, Jags jag...@gmail.com wrote: is there a simple example of HttpServerConnection usage in android ? can it be used for posting some data to android device ? i mean get post type ? thanks and regards Jagat -- 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: DisplayMetrics xdpi and ydpi returning incorrect values
Thanks. I just verified that xdpi and ydpi return 254 on a Nexus One device. Ashutosh On Jan 25, 3:01 pm, Romain Guy romain...@android.com wrote: Is it then true that the OS works only in the stepped values of 120, 160 and 240? Yes indeed. Also, any idea if xdpi and ydpi would be fixed anytime soon? Or if some APIs would allow us to query the physical dimensions of the screen? In a future version of Android. Note that this issue is specific to Droid. Thanks, Ashutosh On Jan 25, 2:39 pm, Romain Guy romain...@android.com wrote: This is a known bug. Although screenDPI=240 is the correct value (it's not the real density of the display, but the density used by the OS for that screen.) On Mon, Jan 25, 2010 at 1:37 AM, Ashutosh Sharma ashusha...@gmail.com wrote: Hi, xdpi and ydpi are currently returning 96 on a Motodola Droid device. screenDPI returns a stepped value of 240, which still isn't the correct value. This issue was also present much earlier (pre-cupcake) -http://groups.google.com/group/android-developers/browse_thread/threa... Is this a known bug? Is this expected to be fixed soon? Given the varying pixel densities of devices that are coming up, having a way to obtain accurate screen DPI is essential. Thanks, Ashutosh -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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
Re: [android-developers] Re: Get Attributes of a media file.
Hi Kumar, The file has just been downloaded. i doubt if it would be present in MediaStore. Any other alternate solution.?? On Mon, Jan 25, 2010 at 12:02 PM, Kumar Bibek coomar@gmail.com wrote: You can query the MediaStore content provider to get the details. In the Android docs, search for this, and you will get a lot of information. Kumar Bibek On Jan 25, 9:00 am, Manjunatha M man...@gmail.com wrote: Hi, I have downloaded a media file. (say mp3 file). I need to get the attributes of the file, like ARTIST, TITLE etc. Can anyone help me on this??? -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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
Re: [android-developers] Re: AVD - Emulator limitations
In Eclipse go to the DDMS perspective and you'll see a panel with all the emulator options in it. You can make calls, send/receive SMS's and set the GPS location. On Mon, Jan 25, 2010 at 6:26 AM, Kumar Bibek coomar@gmail.com wrote: Hey, Of course it can make calls, to other emulators, and it can emulate GPS too Checkout the emulator options in the DDMS perspective to see these options. Kumar Bibek On Jan 22, 10:10 am, Sudhir Nallagangu nallagan...@gmail.com wrote: I am curious on limitations on AVD /Emulators. It is clear that it cannot support making phone calls etc ..Can it emulate GPS to leverage google maps and navigations? Sudhir -- 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] Browser Name?.
Hi, what's the name of default browser in android?.. for iphone safari... for android ?.. -- Thanks Regards Sasikumar.S -- 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] Scrolling Programmatically in a table
Hello, I have a table with a number of rows excedding beyond the screen size, so I'll have to implement scrolling for them. But my problem is that I don't have to use ScrollView Or HorizontalScrollView for this purpose. I want to programmatically scroll the table both vertically and horizontally. I was unable to find any relevant info for the same in the google developer site, so if anyone could give me some insight or an example for the same. Thanks in advance -- 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: MotionEvent ACTION_DOWN throwing security exception for INJECT_EVENT permission
Injecting events to other applications/activities is not allowed. On Jan 25, 9:57 am, swapnil kamble swap.kam...@gmail.com wrote: Hi, I have added this line in my androidManifest.xml uses-permission android:name=android.permission.INJECT_EVENT/ I am trying to execute following code, long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); Instrumentation inst = new Instrumentation(); MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0); Log.d( LOG_TAG,injecting motion event down ); *inst.sendPointerSync(event); //wm.injectPointerEvent( event,true );* Both above lines are throwing exception W/System.err( 762): java.lang.SecurityException: Injecting to another application requires INJECT_EVENT permission. Do we need anything else too to get it working ? Thanks in advance -- 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: MotionEvent ACTION_DOWN throwing security exception for INJECT_EVENT permission
I am not injecting events in other application. I want to do that when my activity is running . On Mon, Jan 25, 2010 at 4:51 PM, moneytoo m...@seznam.cz wrote: Injecting events to other applications/activities is not allowed. On Jan 25, 9:57 am, swapnil kamble swap.kam...@gmail.com wrote: Hi, I have added this line in my androidManifest.xml uses-permission android:name=android.permission.INJECT_EVENT/ I am trying to execute following code, long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); Instrumentation inst = new Instrumentation(); MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0); Log.d( LOG_TAG,injecting motion event down ); *inst.sendPointerSync(event); //wm.injectPointerEvent( event,true );* Both above lines are throwing exception W/System.err( 762): java.lang.SecurityException: Injecting to another application requires INJECT_EVENT permission. Do we need anything else too to get it working ? Thanks in advance -- 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 -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- 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: Loop audio from mic to earpiece?
Just to update you a bit this code works in 1.5 : audio_service.setSpeakerphoneOn(false); audio_service.setMode(AudioManager.MODE_IN_CALL); audio_service.setRouting(AudioManager.MODE_NORMAL, AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL); However I've yet to find a solution for 1.6 + Any help would be greatly appreciated Thanks On Mon, Jan 25, 2010 at 9:19 AM, Donal Rafferty draf...@gmail.com wrote: Hi Ani, I am working on 1.5 (CupCake) and have tried to use the setRouting method, however the audio still appears to be coming out of the speaker. I also have an eclair device and the audio is coming out of the speaker on that device too. I have tried using the Audiomanager and the STREAM_VOICE_CALL also but with no luck at all. My code is posted above in case I may be using the methods the wrong way? On Mon, Jan 25, 2010 at 3:09 AM, ani anish198519851...@gmail.com wrote: Not 100% sure about the earpiece, but you specify a stream when you create the AudioTrack and I think a stream encpsulates audio routing and volume amongst possibly other things. If you set the stream to STREAM_VOICE_CALL it might come through the earpiece as this is where a call would be routed, although I guess that depends on headsets and stuff. Can anyone clarify if I am right? As for earpiece routing we can route audio to earpiece using setrouting call in the case of cupcake.In case of ECLAIR you can use various custom api's provided by android to route it to earpiece (google it).You need to set the route explicitly to get the audio out of earpiece or any other place.STREAM_VOICE_CALL will work i think but not 100% sure.Please check in case you are not getting let me 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.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] Browser Name?.
I don't think it has a name except for Browser. The engine it uses is WebKit, the same as the iPhone, Safari and Chrome. If you mean what does the browser report itself as you could look at the user agent string which it reports itself as: HTC-P4600/1.2 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) UP.Link/6.3.1.17.0 That one was for the HTC Dream. You can find the user agent for other devices on this page (not sure how complete it is): http://www.zytrax.com/tech/web/mobile_ids.html Matt On Mon, Jan 25, 2010 at 11:18 AM, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi, what's the name of default browser in android?.. for iphone safari... for android ?.. -- Thanks Regards Sasikumar.S -- 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] RoboGuice
I'm using RoboGuice, for a few days now, and so far I like it. Does anyone else use RoboGuice? http://code.google.com/p/roboguice/ -- 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] Browser Name?.
Thank U... On Mon, Jan 25, 2010 at 5:32 PM, Matt Oakes m...@matto1990.com wrote: I don't think it has a name except for Browser. The engine it uses is WebKit, the same as the iPhone, Safari and Chrome. If you mean what does the browser report itself as you could look at the user agent string which it reports itself as: HTC-P4600/1.2 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) UP.Link/6.3.1.17.0 That one was for the HTC Dream. You can find the user agent for other devices on this page (not sure how complete it is): http://www.zytrax.com/tech/web/mobile_ids.html Matt On Mon, Jan 25, 2010 at 11:18 AM, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi, what's the name of default browser in android?.. for iphone safari... for android ?.. -- Thanks Regards Sasikumar.S -- 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- 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 keycode is the HTC Hero 'Hide Keyboard' button?
As per the subject. It doesn't seem to generate any callbacks to onKeyUp()/onKeyDown(). Cheers James -- 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: Copy Protection
After turning off copy protection and losing db and local files, are there any way to restore them? Regards, Per Sandström On Jan 15, 6:10 am, Kumar Bibek coomar@gmail.com wrote: Hi Andrei, If you don't care about dev phones downloading your app, and ripping apart your db and local files, then it's fine. Kumar Bibek On Jan 15, 6:34 am, Andrei gml...@gmail.com wrote: I have Copy Protection turned on for my app, but now i want to remove it Will there be any problems if i remove it now? 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: Browser Name?.
Its generally referred as Chrome Lite. But its not the official name. check the link :- http://blogs.zdnet.com/Burnette/?p=662 http://www.androidcentral.com/tags/chrome-lite Thanks AJ On Jan 25, 5:20 pm, Sasikumar.S sasikumar.it1...@gmail.com wrote: Thank U... On Mon, Jan 25, 2010 at 5:32 PM, Matt Oakes m...@matto1990.com wrote: I don't think it has a name except for Browser. The engine it uses is WebKit, the same as the iPhone, Safari and Chrome. If you mean what does the browser report itself as you could look at the user agent string which it reports itself as: HTC-P4600/1.2 Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11) UP.Link/6.3.1.17.0 That one was for the HTC Dream. You can find the user agent for other devices on this page (not sure how complete it is): http://www.zytrax.com/tech/web/mobile_ids.html Matt On Mon, Jan 25, 2010 at 11:18 AM, Sasikumar.S sasikumar.it1...@gmail.com wrote: Hi, what's the name of default browser in android?.. for iphone safari... for android ?.. -- Thanks Regards Sasikumar.S -- 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Thanks Regards Sasikumar.S -- 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 estabilish TCP communication between emulators
Hi I have developed an application my pc as server and android as client. I am successfully run it. Now i have opened two emulators and i made necessary redirection to communicate those two emulators. my emulators port are 5554 and 5556 Now my question is i want to run server on 5554 and client on 5556 But this is not working. please tell me how to do it. What are the ip and port numbers i need to use please help me -- 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: Cant get data from my service
Hi Donal, Thanks for showing this. I wound up using a similar technique by setting a BroadcastReceiver on both the Activity and the Service and then using sendBroadcast to send Intents back and forth between them. But the two are otherwise not explicitly bound. I want the Service to remain active even if/when the Activity that spaned it goes dormant with onPause(). According to the docs with the bindService call …if this Context is an Activity that is stopped, the service will not be required to continue running until the Activity is resumed. What do you think? On Mon, Jan 25, 2010 at 4:27 AM, Donal Rafferty draf...@gmail.com wrote: Hi WoodManEXP, It turned out in the end I just hadn't binded the service properly to the activity Like this: Intent i = new Intent(); i.setClassName(team.org, team.org.WIFIService); bindService(i, this, Context.BIND_AUTO_CREATE); On Sun, Jan 24, 2010 at 10:51 PM, WoodManEXP woodman...@gmail.com wrote: Daffo0, I would like to know how you solve this because I have a similar need with a background service doing a job and the background service would like to push updates to an activity (if the activity is running). What are the preferred communication techniques between Service and Activities? You are using IRemoteInterface class. What about IBinder? Have you looked at that? On Jan 19, 12:44 pm, draf...@gmail.com draf...@gmail.com wrote: I have aservicethat is running fine and I can see the data collecting in the logcat, However after creating an aidl and trying to get the information from theserviceto my main activity I have hit a problem. I just cant seem to get the data to pass across at all, I always get a null pointer exception. Here is myserviceclass, I want to get the connectedLevel int to use in my activity class. Is it because I'm not binding properly or what am I missing but any calls to the remote interface to try and get the data ends up with a null pointer exception. My activity class code is posted underneath. Serviceclass public class WIFIService extendsService{ private static final int WIFI_NOTIFY = 0x2001; public static final String EXTRA_UPDATE_RATE = update-rate; public static final String WIFI_SERVICE = cicero.org.WIFIService.SERVICE; private WifiManager mainWifi; private BroadcastReceiver rssiListener = null; private int updateRate = -1; private int connectedLevel; @Override public void onCreate(){ super.onCreate(); mainWifi = (WifiManager) getSystemService(Context.WIFI_SERVICE); notifier = (NotificationManager) getSystemService (Context.NOTIFICATION_SERVICE); } @Override public void onStart(Intent intent, int startId){ super.onStart(intent, startId); updateRate = intent.getIntExtra(EXTRA_UPDATE_RATE, -1); if(updateRate == -1){ updateRate = 6; } rssiListener = new BroadcastReceiver(){ @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if(WifiManager.RSSI_CHANGED_ACTION.equals(action)) { WifiInfo data = mainWifi.getConnectionInfo(); Log.d(WIFISERVICE, RSSI has changed); if(mainWifi.getConnectionInfo()!=null){ setConnectedLevel(data.getRssi()); Log.d(WIFISERVICE, new RSSI = + data.getSSID()+ + data.getRssi() + dBm); } } } }; } @Override public void onDestroy(){ if(rssiListener != null){ unregisterReceiver(rssiListener); rssiListener = null; } if(wifiChangeListener != null){ unregisterReceiver(wifiChangeListener); wifiChangeListener = null; } if(receiverWifi != null){ unregisterReceiver(receiverWifi); receiverWifi = null; } super.onDestroy(); } public void setConnectedLevel(int connectedLevel) { this.connectedLevel = connectedLevel; } @Override public IBinder onBind(Intent intent) { // we only have one, so no need to check the intent return mRemoteInterfaceBinder; } // remote interface private final
Re: [android-developers] How to estabilish TCP communication between emulators
Run your server on some VM.. I did that only On Mon, Jan 25, 2010 at 7:22 PM, saikiran n saikiran@gmail.com wrote: Hi I have developed an application my pc as server and android as client. I am successfully run it. Now i have opened two emulators and i made necessary redirection to communicate those two emulators. my emulators port are 5554 and 5556 Now my question is i want to run server on 5554 and client on 5556 But this is not working. please tell me how to do it. What are the ip and port numbers i need to use please help me -- 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 -- ...Swapnil || Hare Krishna Hare Krishna Krishna Krishna Hare Hare || || Hare RamaHare Rama Rama RamaHare Hare || -- 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 control window-panning when virtual keyboard gets displayed
Hi, is there any way to control the amount that the activity-window gets scrolled up when the virtual keyboard gets displayed? The default (when panning is enabled for that Activity in the Manifest) is to pan exactly that far so that the user can still see the EditText or whatever the user wants to edit. Now I have an EditText below said EditText that dynamically changes text if text gets entered into the EditText above. I'd like to scroll the window a little further up so that both EditTexts get displayed. And I don't want to use a ScrollView, just the normal mechanism that get's triggered when you open up the virtual keyboard. Any pointers to the right API are very welcome! Thank you Ralf -- 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 repeat Login dialog and progress dialog, coordinating with http thread
Hi there, I am having a problem about repeating Login dialog (an AlertDialog) and progress dialog, coordinating with http thread. I suppose repetitive Login dialog (if fail, continue) handling should be common and straightforward. I guess my approach must be wrong somewhere. I already spent 2 days on this and am desperate. So please help. The usecase is like this: I have a main activity. User starts the app, the main activity starts. Show a login dialog (generated by the main thread, i.e. from onCreate ()). The main thread then starts a wait_thread, which will wait for http to return data and check the data and decide what to do. After user input username/password and press login, a progress dialog starts. The progress dialog starts an http_thread to talk to the server and get replies. Once done, it will notify the waiting thread. If the user type in the right username password first time, the code works fine. But it always fail for 2nd time Login, i.e. When first login fail (wrong username/password), the wait_thread will generate 2nd Login dialog to let user repeat the login process. But after user hit the login on this 2nd Login dialog, the system always crashes. The exception here is: ERROR/AndroidRuntime(21880): Uncaught handler: thread main exiting due to uncaught exception ERROR/AndroidRuntime(21880): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. The followings are part of the code. ... public class Test extends Activity implements Constants,Runnable{ ... @Override public void onCreate(Bundle savedInstanceState) { ... showDialog(DIALOG_LOGIN); // startHttpWaitThread(); } private void startHttpWaitThread(){ try { Thread dialogThread = new Thread(this); dialogThread.start(); } catch(Exception e){ //showDialog(DIALOG_LOGIN); } } /* @Override public void onStart() { super.onStart(); } */ public void run(){ Looper.prepare(); try { synchronized(httpReplyData){ // httpReplyData holds all needed data returned from server httpReplyData.wait(); } } catch(Exception e) { e.printStackTrace(); } if (httpReplyData.getHttpResult()!=HTTP_REPLY_STATUS_CODE_OK_200) showDialog(DIALOG_LOGIN); Looper.loop(); } @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_LOGIN: return getLoginDialog(this);//, case DIALOG_LOGIN_PROGRESS: return new LoginProgressDialog (ctxForLoginProgressDialog);//} return null; } private Dialog getLoginDialog(Context ctx) {//, String name, String pwd){ ... dialogBuilder.setPositiveButton(R.string.login, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { networkService.startHttpThread (HTTP_REQUEST_LOGIN_INDEX, getUsername(), getPassword()); // networkService is the HTTP manager showDialog(DIALOG_LOGIN_PROGRESS); // startHttpWaitThread(); } }); return dialogBuilder.create(); } private class LoginProgressDialog extends ProgressDialog implements Constants{ //private ProgressThread progressThread; public LoginProgressDialog(Context ctx){ super(ctx); ... } } } ~~~ I also tried second approach, which moves the wait_thread into progress dialog class/object, following Google’s “Creating a ProgressDialog” (http://developer.android.com/guide/topics/ui/ dialogs.html#ProgressDialog). The 2nd login dialog is started by the progress dialog. Its wait() method gets called ONLY once (that is before 3nd showDialog(DIALOG_LOGIN) gets called). Seems to me the unfinished progressDialog’s thread blocks new progressDialog to be generated, I mean, when new showDialog(DIALOG_LOGIN_PROGRESS) called, the system will continue to use last progressDialog which has already responded to the first notify call and won’t respond to the notify call any more. So although the http thread handles well and call notify in due time, no one is waiting for that notify. Thus the system just hungs, while progress dialog is doing it animation endlessly. The followings are part of the code: … public class Test {// extends Activity implements Constants { ... @Override public void onCreate(Bundle savedInstanceState) { ... showDialog(DIALOG_LOGIN); // } ... @Override protected Dialog
[android-developers] API to provide isSimSupportingPaidApps()
As I understand it Android takes the country from the SIM-card to publish the localized version of the market (ie. not showing paid apps in many countries). I have a x-days trial version of my app but of course I dont want it to expire in countries where paid apps are not yet supported. I guess I can write the JAVA function myself, by using fx. TelephonyManager.getSimCountryIso(). But as the list of countries is changing, it would be better if Google or OHA maintained the list (perhaps through the API). BR /Tomas -- 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 estabilish TCP communication between emulators
See the documentation at http://developer.android.com/guide/developing/tools/emulator.html#connecting On Mon, Jan 25, 2010 at 5:52 AM, saikiran n saikiran@gmail.com wrote: Hi I have developed an application my pc as server and android as client. I am successfully run it. Now i have opened two emulators and i made necessary redirection to communicate those two emulators. my emulators port are 5554 and 5556 Now my question is i want to run server on 5554 and client on 5556 But this is not working. please tell me how to do it. What are the ip and port numbers i need to use please help me -- 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 repeat Login dialog and progress dialog, coordinating with http thread
I haven't read your code-snippet, but here is how i would do it: When the user wants to login, do a showDialog(idDialogLogin), containing the username/password fields Login/Cancel buttons. When Login is pressed, dismiss the dialog and start a progress-dialog and the actual logging in. Handle this through an AsyncTask: onPreExecute shows the progress dialog. The background task does the actual logging in (through http). onPostExecute either hides it (successful login) or just does a showDialog(idDialogLogin) again of the login-dialog on an unsuccessful login. When cancel is pressed, just dismiss the dialog. On Jan 25, 9:47 am, qmwestview qmwestv...@googlemail.com wrote: Hi there, I am having a problem about repeating Login dialog (an AlertDialog) and progress dialog, coordinating with http thread. I suppose repetitive Login dialog (if fail, continue) handling should be common and straightforward. I guess my approach must be wrong somewhere. I already spent 2 days on this and am desperate. So please help. The usecase is like this: I have a main activity. User starts the app, the main activity starts. Show a login dialog (generated by the main thread, i.e. from onCreate ()). The main thread then starts a wait_thread, which will wait for http to return data and check the data and decide what to do. After user input username/password and press login, a progress dialog starts. The progress dialog starts an http_thread to talk to the server and get replies. Once done, it will notify the waiting thread. If the user type in the right username password first time, the code works fine. But it always fail for 2nd time Login, i.e. When first login fail (wrong username/password), the wait_thread will generate 2nd Login dialog to let user repeat the login process. But after user hit the login on this 2nd Login dialog, the system always crashes. The exception here is: ERROR/AndroidRuntime(21880): Uncaught handler: thread main exiting due to uncaught exception ERROR/AndroidRuntime(21880): android.view.ViewRoot $CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views. The followings are part of the code. ... public class Test extends Activity implements Constants,Runnable{ ... @Override public void onCreate(Bundle savedInstanceState) { ... showDialog(DIALOG_LOGIN); // startHttpWaitThread(); } private void startHttpWaitThread(){ try { Thread dialogThread = new Thread(this); dialogThread.start(); } catch(Exception e){ //showDialog(DIALOG_LOGIN); } } /* �...@override public void onStart() { super.onStart(); } */ public void run(){ Looper.prepare(); try { synchronized(httpReplyData){ // httpReplyData holds all needed data returned from server httpReplyData.wait(); } } catch(Exception e) { e.printStackTrace(); } if (httpReplyData.getHttpResult()!=HTTP_REPLY_STATUS_CODE_OK_200) showDialog(DIALOG_LOGIN); Looper.loop(); } @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_LOGIN: return getLoginDialog(this);//, case DIALOG_LOGIN_PROGRESS: return new LoginProgressDialog (ctxForLoginProgressDialog);// } return null; } private Dialog getLoginDialog(Context ctx) {//, String name, String pwd){ ... dialogBuilder.setPositiveButton(R.string.login, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { networkService.startHttpThread (HTTP_REQUEST_LOGIN_INDEX, getUsername(), getPassword()); // networkService is the HTTP manager showDialog(DIALOG_LOGIN_PROGRESS); // startHttpWaitThread(); } }); return dialogBuilder.create(); } private class LoginProgressDialog extends ProgressDialog implements Constants{ //private ProgressThread progressThread; public LoginProgressDialog(Context ctx){ super(ctx); ... } } } ~~~ I also tried second approach, which moves the wait_thread into progress dialog class/object, following Google’s “Creating a ProgressDialog” (http://developer.android.com/guide/topics/ui/ dialogs.html#ProgressDialog). The 2nd login dialog is started by the progress dialog. Its wait() method gets called ONLY once (that is before 3nd showDialog(DIALOG_LOGIN) gets called). Seems to me the
[android-developers] density setting for aspect ration long screens
We can set the pixel values in custom views by multiplying them with this.getResources().getDisplayMetrics().density; This is ok when the screen aspect ratio is normal means not long But how can we set the pixels along Y-axis when the aspect ration is long. -- Best Regards, Atif Gulzar I Unicode, ɹɐzlnƃ ɟıʇɐ -- 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: Regarding network connectivity on Android.
Any feedback on this friends ? On Sun, Jan 24, 2010 at 11:11 AM, Android Development indodr...@gmail.comwrote: Hello, Problem Statement: -- I wish to achieve the following: 1. Create a GPRS connection from my application and get the assigned IP address. 2. Send and Receive data through this connection. I can find whether GPRS is in use using TelephonyManager's getNetworkType ( ) call. I can use the ConnectivityManager to find out the information on the active networks. However, my doubts are listed below: Doubts: 1. I cannot find a way to initiate a GPRS connection without having to use the browser. I want to send packets transparently. 2. Is there no way for starting a GPRS connection, like the WiFiManager provides for WiFi connections? 3. There is a method by the namegetSubtypehttp://developer.android.com/reference/android/net/NetworkInfo.html#getSubtype()() in ConnectivityManager. Is the integer subtype returned here conform to the network type constant values of TelephonyManager ? If so, kindly confirm. -- 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: Battery Temperature
Good question,I am interested in this too. On Jan 18, 10:53 am, Narseo Vallina nar...@gmail.com wrote: Hi, all I'm trying to obtain the battery temperature, the batteryvoltageand the battery current. The return value of the code (see below) forvoltageand batteryTemperature is always 0 while the others work. I would like to know if there's any other way of obtaining this information and how. Finally, I couldn't find anything in the API for accessing the battery current... Is there any method to know its value? Many thanks in advance, private BroadcastReceiver battReceiver = new BroadcastReceiver(){ //StringBuilder sb = new StringBuilder(); @Override public void onReceive(Context context, Intent intent) { Log.e(BATTERY_STATS, onReceive. Changed Value); // TODO Auto-generated method stub context.unregisterReceiver(this); int rawlevel = intent.getIntExtra(level, -1); int scale = intent.getIntExtra(scale, -1); int status = intent.getIntExtra(status, -1); intvoltage= intent.getIntExtra(voltage, -1); int batteryTemperature = intent.getIntExtra(temperature, -1); if (status=1){ status=1; } int level = -1; if (rawlevel =0 scale 0){ level = (rawlevel*100)/scale; } String batteryTechnology = intent.getStringExtra(technology); //SAVE VALUES } }; -- 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: Guide Me Right Way
The Busy Coder's Guide to Android Development Just got one myself. On Sun, Jan 24, 2010 at 11:02 PM, Kevin Duffey andjar...@gmail.com wrote: The Java book is good.. Oriely has some great books as well for learning Java. Perhaps the best resource I've found on Android.. I keep plugging this so I am thinking I'll get a free year out of it (Mark?? ;).. is Mark Murphy's online books. For $40, you get 3 online books that are updated every so often and you get the updates for a year as part of the price. The best part is Mark has a forum for the book as well as you'll see him replying here on this forum quite a bit. I won't knock the other books, the few on android I found were pretty good, but having the knowledge of Mark, along with some of the android team like Dianne, Romain and a few others here, has taught me a ton already. Google Mark Murphy online books (always forget the name!!), you'll find it. CommonsWare I think it is, or the site he sells it from. On Sun, Jan 24, 2010 at 8:09 PM, Anthoni anthoni.gard...@gmail.com wrote: Hi Sanj, I was also in this same predicament a few days ago. Desperately wanted to learn Android programming, but knew smatterings of Java code. What I did was the following :- -- Purchase Sams Teach Yourself Java In 21 Days Purchase Java Generics and Collections (Note: Android heavily uses Generics so you need a firm grasp on them) Purchase Hello Android There are also lots of bookmarks and tutorial sites ready to read and digest once you know your way around the basics of Java. Last week I got the Sams book, on Saturday I deployed my first Android application to the emulator. I still have lots more to learn but I am looking forward to the journey. Regards anthoni On Jan 25, 3:59 am, Kevin Duffey andjar...@gmail.com wrote: You are definitely going to want to learn Java first. Android should come long after it. You can try, but will find yourself missing quite a bit and getting stuck a lot if you try to learn Java and Android at the same time. Android is one of those things you do after you understand Java. To understand Java will take months of learning, practicing, etc. I'd say most developers take quite a bit longer to really understand the internals of how the JVM works, the language, and a good handle on a lot of the libraries you will need. On Sun, Jan 24, 2010 at 1:16 PM, sanj sangeev...@gmail.com wrote: hi,i m very new on mobile application development. i want to learn Android. but i dont know where to start actually. i tried defferent web including developer.android and i deffernt books as well. But problem is i dnt know java at all. And all most everywere i found they write some code and then traslate it in android code to explane. but person like me who have no idea about any of it is very tough. So that is best proctice- first learn java then Android or learn android with part of java (onbly required to understand android). sorry for bad english. -- 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 -- 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: Guide Me Right Way
That's the one. Thanks Temitope On Mon, Jan 25, 2010 at 7:47 AM, Temitope Akinwande takinwa...@gmail.comwrote: The Busy Coder's Guide to Android Development Just got one myself. On Sun, Jan 24, 2010 at 11:02 PM, Kevin Duffey andjar...@gmail.com wrote: The Java book is good.. Oriely has some great books as well for learning Java. Perhaps the best resource I've found on Android.. I keep plugging this so I am thinking I'll get a free year out of it (Mark?? ;).. is Mark Murphy's online books. For $40, you get 3 online books that are updated every so often and you get the updates for a year as part of the price. The best part is Mark has a forum for the book as well as you'll see him replying here on this forum quite a bit. I won't knock the other books, the few on android I found were pretty good, but having the knowledge of Mark, along with some of the android team like Dianne, Romain and a few others here, has taught me a ton already. Google Mark Murphy online books (always forget the name!!), you'll find it. CommonsWare I think it is, or the site he sells it from. On Sun, Jan 24, 2010 at 8:09 PM, Anthoni anthoni.gard...@gmail.com wrote: Hi Sanj, I was also in this same predicament a few days ago. Desperately wanted to learn Android programming, but knew smatterings of Java code. What I did was the following :- -- Purchase Sams Teach Yourself Java In 21 Days Purchase Java Generics and Collections (Note: Android heavily uses Generics so you need a firm grasp on them) Purchase Hello Android There are also lots of bookmarks and tutorial sites ready to read and digest once you know your way around the basics of Java. Last week I got the Sams book, on Saturday I deployed my first Android application to the emulator. I still have lots more to learn but I am looking forward to the journey. Regards anthoni On Jan 25, 3:59 am, Kevin Duffey andjar...@gmail.com wrote: You are definitely going to want to learn Java first. Android should come long after it. You can try, but will find yourself missing quite a bit and getting stuck a lot if you try to learn Java and Android at the same time. Android is one of those things you do after you understand Java. To understand Java will take months of learning, practicing, etc. I'd say most developers take quite a bit longer to really understand the internals of how the JVM works, the language, and a good handle on a lot of the libraries you will need. On Sun, Jan 24, 2010 at 1:16 PM, sanj sangeev...@gmail.com wrote: hi,i m very new on mobile application development. i want to learn Android. but i dont know where to start actually. i tried defferent web including developer.android and i deffernt books as well. But problem is i dnt know java at all. And all most everywere i found they write some code and then traslate it in android code to explane. but person like me who have no idea about any of it is very tough. So that is best proctice- first learn java then Android or learn android with part of java (onbly required to understand android). sorry for bad english. -- 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 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] avcrp motorola ht820
i am trying to catch the physical button events on a motorola ht820 bluetooth headset and it i cannot seem to trap those events. the media player on the device *is* able to catch those events. based, on what I've read and googled for, it seems like this should do the trick -- rec = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { KeyEvent event = (KeyEvent) intent.getParcelableExtra (Intent.EXTRA_KEY_EVENT); if (event != null event.getAction() == KeyEvent.ACTION_DOWN) { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: getInstance().playpause(); abortBroadcast(); break; case KeyEvent.KEYCODE_MEDIA_STOP: getInstance().stop(true); abortBroadcast(); break; case KeyEvent.KEYCODE_MEDIA_NEXT: getInstance().next(); abortBroadcast(); break; case KeyEvent.KEYCODE_VOLUME_UP: AudioManager audioMgrUp = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audioMgrUp.adjustStreamVolume( AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI); break; case KeyEvent.KEYCODE_VOLUME_DOWN: AudioManager audioMgrDown = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audioMgrDown.adjustStreamVolume( AudioManager.STREAM_MUSIC, AudioManager.ADJUST_LOWER, AudioManager.FLAG_SHOW_UI); break; } } } }; // Use a separate receiver for ACTION_MEDIA_BUTTON broadcasts, // since we need to manually adjust its priority (to make sure // we get these intents *before* the media player.) IntentFilter intentFilter = new IntentFilter( Intent.ACTION_MEDIA_BUTTON); but it does not seem to work. Here's what I'm seeing in the logcat. any ideas? tia. 01-25 07:39:53.338: WARN/AudioFlinger(45): write blocked for 54 msecs 01-25 07:39:53.388: ERROR/MediaPlaybackService(652): BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0 01-25 07:39:53.398: WARN/AudioFlinger(45): write blocked for 56 msecs 01-25 07:39:53.428: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.448: INFO/BluetoothA2dpService.cpp(23187): ACVRCP : Remote Pannel Pressed with Channel:0 01-25 07:39:53.458: INFO/BluetoothA2dpService.cpp(23187): Panel Opcode: 0x4c 01-25 07:39:53.498: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.508: VERBOSE/MediaPlaybackService(652): onStart 01-25 07:39:53.518: ERROR/MediaPlaybackService(652): MediaMode:Local 01-25 07:39:53.518: DEBUG/MediaPlaybackService(652): CMDPREVIOUS 01-25 07:39:53.558: ERROR/MediaPlaybackService(652): BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0 01-25 07:39:53.588: WARN/AudioFlinger(45): write blocked for 146 msecs 01-25 07:39:53.658: INFO/BluetoothA2dpService.cpp(23187): ACVRCP : Remote Pannel Released with Channel:0 01-25 07:39:53.668: INFO/BluetoothA2dpService.cpp(23187): Panel Opcode: 0x4c 01-25 07:39:53.698: WARN/AudioFlinger(45): write blocked for 62 msecs 01-25 07:39:53.738: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.968: INFO/BluetoothA2dpService.cpp(23187): ACVRCP : Remote Pannel Pressed with Channel:0 01-25 07:39:53.978: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.988: VERBOSE/MediaPlaybackService(652): onStart 01-25 07:39:53.988: ERROR/MediaPlaybackService(652): MediaMode:Local 01-25 07:39:53.988: DEBUG/MediaPlaybackService(652): CMDNEXT 01-25 07:39:53.988: DEBUG/MediaPlaybackService(652): next mPlayOnNextPrev=true 01-25 07:39:54.028: ERROR/MediaPlaybackService(652): BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0 -- 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] US Taxes: Does Google send a 1099 tax form?
Hi, I'm not sure where to ask this. So, here it goes :) Does google send a 1099 to holder of a Google CheckOut account for the Android Market. If not, how can we know what Google has reported to the IRS? 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] Dynamic Voltage Scaling
I am a Masters student at SFU and I am interested in improving power usage efficiency of mobile devices. Is there any way to adjust the clock speed of the CPU dynamically? -- 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] uses-library
I have an app that includes this code blurb: System.loadLibrary(foo_jni); Where the functionality in foo_jni is in the OSP under external/foo However, there is no uses-library tag in my app's AndroidManifest.xml I suspect that some crashes reported from the field is from phones that lack this android system library. My aspiration here is that I add a uses-library tag to my file and that this might keep people who flat-out lack this library from downloading or at least installing my app, which has zero chances of working on their phone, However... The (extremely limited) documentation for uses-library implies the libraries have package-y names such as com.foo.mylib ... which seems to disagree with the name used in the Java code I am looking at. How do I guess at the string to use here, or is my effort to worry about this not going to help me? -- 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: Contacts FAQ?
Just an update for those of you still lost on adding custom accounts, sync adapters, etc. I found a great article here: http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1/ http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-2/ Part 2 was the part I needed (how to render the information you synced to a contact). HTH, Berto On Jan 22, 4:57 pm, Berto mstbe...@gmail.com wrote: So, it turns out that anything you put into your own ExternalSource will never get parsed and therefore (theoretically) never show up. Or am I doing something wrong? The code looks like it will parse only the information in ContactsDataKind and not the EditField node from the following: ContactsSource xmlns:android=http://schemas.android.com/apk/res/ android ContactsDataKind android:mimeType=com.example.mimetype android:icon=@drawable/icon android:summaryColumn=data2 android:detailColumn=data3 EditField column=data1 title=@string/sample_string / /ContactsDataKind /ContactsSource Essentially, I have adding an account and the sync adapter working. But when I try to create a new contact through the contacts app, I can never see any of the fields I added in the XML structure defined by meta-data android:name=android.provider.CONTACTS_STRUCTURE android:resource=@xml/contacts /. Has anyone figured out an answer to this problem yet? I've seen a few posts, but nothing with a solid answer. On Jan 12, 4:45 am, Jens dunkingbikk...@gmail.com wrote: You could check the Email app - its the current location of the Exchange ActiveSync SyncAdapter implementation. http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=s... Note that this adapter isn't the complete story as any contacts you create with your custom accounts will be next to useless without looking into the wonky ExternalSource.java integration required for custom adapters (unless your happy with contacts that only contains a name and photo). http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;... Sources.java contains the super-special-let's-not-use-our-own-API:s- because-that's-hard-work-and-might-require-us-to-actually-document- anything-or-heaven-forbid-test-it if-statement that determines the layout of your contacts in the Contacts app - and gives super-special treatment to accounts with the type com.google or com.android.exchange. ExternalSource.java contains the sparse and incomplete API documentation that you're going to have to use. On 9 Jan, 22:16, joebowbeer joe.bowb...@gmail.com wrote: On Dec 10 2009, 7:03 am, ydario mc6...@mclink.it wrote: I tried addingcontactscode to this project http://code.google.com/p/androidaccounts/ The referenced project no longer exists. Are there any similar projects to check out? If not, could someone who has a handle on this start anewproject? -- 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] unit testing
I need a reference to an introduction to Android unit testing for a coworker, but the SDK docs don't seem to provide an introduction. I myself used the apidemos and the api docs, but I was wondering if there's a concise intro to Android unit testing? -- 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] IllegalStateException
Hi all, I develope an application about Contacts Provider. It includes many database operations. But there is a problem about sqlite exception. I have the following information exits in the log file. I am confused. Is it normal behavior? Thanks. 01-14 21:02:48.692 I/dalvikvm( 1923): Uncaught exception thrown by finalizer (will be discarded): 01-14 21:02:48.692 I/dalvikvm( 1923): Ljava/lang/ IllegalStateException;: Finalizing cursor android.database.sqlite.sqlitecur...@2e56fef8 on people that has not been deactivated or closed 01-14 21:02:48.692 I/dalvikvm( 1923): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) 01-14 21:02:48.702 I/dalvikvm( 1923): at dalvik.system.NativeStart.run (Native Method) -- 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] IllegalStateException
It is not the normal behavior. Read the log, it tells you that you did not close one of your Cursors. Make sure you close them in your Activity's onDestroy() at the very least. On Mon, Jan 25, 2010 at 9:15 AM, Vic kvic2...@gmail.com wrote: Hi all, I develope an application about Contacts Provider. It includes many database operations. But there is a problem about sqlite exception. I have the following information exits in the log file. I am confused. Is it normal behavior? Thanks. 01-14 21:02:48.692 I/dalvikvm( 1923): Uncaught exception thrown by finalizer (will be discarded): 01-14 21:02:48.692 I/dalvikvm( 1923): Ljava/lang/ IllegalStateException;: Finalizing cursor android.database.sqlite.sqlitecur...@2e56fef8 on people that has not been deactivated or closed 01-14 21:02:48.692 I/dalvikvm( 1923): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596) 01-14 21:02:48.702 I/dalvikvm( 1923): at dalvik.system.NativeStart.run (Native Method) -- 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 -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. 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: uses-library
ASFAIK Android manifest uses-library and java.lang.System.loadLibrary () are not related. Manifest uses-library references a pre- installed Java jar (hence that Java package name) that the application uses. System.loadLibrary loads a native (usally written in C) shared library (e.g., a dll on Windoze or a .so on linux). The native library is accessed from Java with JNI. On Jan 25, 8:20 am, DulcetTone dulcett...@gmail.com wrote: I have an app that includes this code blurb: System.loadLibrary(foo_jni); Where the functionality in foo_jni is in the OSP under external/foo However, there is no uses-library tag in my app's AndroidManifest.xml I suspect that some crashes reported from the field is from phones that lack this android system library. My aspiration here is that I add a uses-library tag to my file and that this might keep people who flat-out lack this library from downloading or at least installing my app, which has zero chances of working on their phone, However... The (extremely limited) documentation for uses-library implies the libraries have package-y names such as com.foo.mylib ... which seems to disagree with the name used in the Java code I am looking at. How do I guess at the string to use here, or is my effort to worry about this not going to help me? -- 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] OutOfMemory
Hello All, I am facing an Out Of Memory Exception while playing with the application for sometime. I looked in to HeapDump using MAT, and also monitored the heap through DDMS. But HeapDump looks good to me and DDMS heap size is well in limit. Still I am getting this Exception. This morning when it crashed the DDMS heap details are: Heap size - 5.945 MB allocated - 4.463 MB Free- 1.482 MB %Used - 75.07% Could anyone help me to resolve this? as my timeslines are very closure and this is a show stopper for me. Thanks in Advance. Irfan -- 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] Incoming SMS
You cannot un-install/remove the apps which are preinstalled. If you just restart the device - you start see the default SMS app. Assuming you re-imaged - you should still be able to see and download the 3rd party app. -Dan On Mon, Jan 25, 2010 at 5:32 AM, Mohan vmkrish...@gmail.com wrote: Hi friends, I am an end android user. I have Samsung Galaxy GT-I7500. A few days back I downloaded the Handcent SMS app. I am happy with the app. But I was receiving notifications both from my native app and Handcent SMS. In order to stop the notification I used Advanced Task Manager to remove the native SMS app in the name of 'SMS' instead of the disabling the notification. Instead of removing the messaging service my data usage notification SMS from my service provider has stopped. I am receiving other messages and able to send messages. I have flashed my ROM but the 'SMS' app is still not installed. Please help me. Thanks Rgds...Mohan -- 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] Incoming SMS
You can disable notifications from the android sms app in settings. On Mon, Jan 25, 2010 at 5:32 AM, Mohan vmkrish...@gmail.com wrote: Hi friends, I am an end android user. I have Samsung Galaxy GT-I7500. A few days back I downloaded the Handcent SMS app. I am happy with the app. But I was receiving notifications both from my native app and Handcent SMS. In order to stop the notification I used Advanced Task Manager to remove the native SMS app in the name of 'SMS' instead of the disabling the notification. Instead of removing the messaging service my data usage notification SMS from my service provider has stopped. I am receiving other messages and able to send messages. I have flashed my ROM but the 'SMS' app is still not installed. Please help me. Thanks Rgds...Mohan -- 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: unit testing
Thanks for the replies. Actually, I'm not stuck with testing, I use android unit testing and I'm quite satisfied with it. Right now I'm looking for a good intro on Android unit testing for a coworker. On Jan 26, 12:25 am, Fred Grott(Android Expert, http://mobilebytes.wordpress.com) fred.gr...@gmail.com wrote: you can only use those mocks supplied by google Sdk..not mockkit.. What areas are you getting stuck at? On Jan 25, 1:33 pm, ko5tik kpriblo...@yahoo.com wrote: On Jan 25, 5:38 pm, Christine christine.kar...@gmail.com wrote: I need a reference to an introduction to Android unit testing for a coworker, but the SDK docs don't seem to provide an introduction. I myself used the apidemos and the api docs, but I was wondering if there's a concise intro to Android unit testing? Well, there is at least some support for unit testing in IDEA plugin, but testing occurs only on device or emulator (sloow...) - as libraries used to compile against contain merely stubs However, you can employ mock frameworks ( I played around today ) - but you have to use something really powerfull ( I stuck with mockit , as jmock has problems in mocking concrete final classes ) -- 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] Https: CertPathValidatorException (TrustAnchor for CertPath not found)
The Error: Unexpected network error while connecting to web service: Not trusted server certificate javax.net.ssl.SSLException: Not trusted server certificate at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake (OpenSSLSocketImpl.java:363) . Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not found. ... The Question: There are discussions all around about problems when https connecting Android to validly signed servers, but nobody has found an effective solution besides bypassing the certificate validation process. And I'm not talking about the understandably questionable self-signed certificates. I'm connecting to a DigiCert-signed server so I don't see what the problem is. DigiCert appears to be a widely used certificate signer so I can't believe all their certs are all invalid on Android. That leads me to another possible answer: that Android is misprocessing some part of DigiCert-signed certificates. This would appear to be true as the error above talks about TrustAnchor for CertPath not found. Sadly I have no idea what a TrustAnchor is or how the validate whether the CertPath is properly structured... Anybody...? -- 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] Fundamental Question
Android Devs, I have a fundamental question regarding a ListActivity before I code. I have a database which I query in the background using AsyncTask. I take the resulting cursor and use it to create a custom SimpleCursorAdapter which binds the cursor data with a custom XML I pass to it (including setting the _id of each value to a TextView). In order to create dynamic icons to go with each record returned, I override setViewValue() for the SimpleCursorAdapter ViewBinder. When the query is done, the adapter is created, I pass the adapter back to the UI thread and set the ListView to that adapter (this is best practice for querying dbs and leaving the UI thread to UI stuff only right?) My question is, since I want to be able to click anywhere on an item in the list and have it create an intent to start a new activity and pass along the records ID, where do I assign an onClickListener to each item? Do I assign it when I override setViewValue() for the SimpleCursorAdapter? Ultimately I want to be able to click an item and have it pull up a new activity which is a detailed screen of an item. Any help is always greatly appreciated. You guys and gals rock! -Longshore -- 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 Team: Please give help on serious OnSensorChanged()-not-called-in-standby bug
I've just updated Smart Alarm Clock (27k installs) with this workaround and it WORKS on Motorola Samsung phones. Unfortunately, it does NOT help to Hero and Tatto phones. Haven't tried running w/o CPU lock because documenation says it wouldn't be possible... Maybe in the next release. BTW, please ask your users to put a star on the issue (something like http://intelligentalarmclock.blogspot.com/2009/12/smart-alarm-clock-needs-your-help-to.html). This will really help us. It's not a hardware bug. It's a software bug - it might be fixed on next firmware update. Let's star the issue. Let's write to HTC support! Yes, we can! =) -- 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] Fundamental Question
Realm X wrote: When the query is done, the adapter is created, I pass the adapter back to the UI thread and set the ListView to that adapter (this is best practice for querying dbs and leaving the UI thread to UI stuff only right?) It's certainly a reasonable pattern. My question is, since I want to be able to click anywhere on an item in the list and have it create an intent to start a new activity and pass along the records ID, where do I assign an onClickListener to each item? Do I assign it when I override setViewValue() for the SimpleCursorAdapter? Neither. Set up a listener on the ListView. If this is part of a ListActivity, just override onListItemClick(). If not, use setOnItemClickListener() on the ListView itself. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Consulting/App Development: http://commonsware.com/consulting -- 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] Pass event to parent view?
I have a layout which contains five TextView. When user clicks any of the five TextView, it will do the same thing: open another activity. So, the OnClickerListener behavior to the five TextView is the same. Is it possible that I only add OnClickListerner to one view, e.g. to layout, so I don't have to add OnClickListerner to each of the five TextView? Put it another way, if none of the children components receives CLICK event, will the CLICK event passed through to their parent, the layout? -- 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] Set default selection for Spinner
On 1/26/2010 3:23 AM, Abdul Mateen wrote: Spinner.setSelection(int postion) function please see it. On Sun, Jan 24, 2010 at 11:45 PM, Quang Tri Tran tvq...@gmail.com mailto:tvq...@gmail.com wrote: I'm binding a data table into a Spinner. But I cannot set the default selection for the Spinner based on a specified identifier which comes from the id column of the table. How can I do that? -- 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 Thanks. I've got it before. But I wanna set the selection by the identifier, not the position. I didn't know how to get a position of an identifier from a cursor. -- 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: Clean up onCreate DataString and Type not working...
I'm not sure if my explanation is clear? It seems that during the life cycle of an activity the getIntent().getDataString() will return the same intent data it originally got when the activity gets terminated and restarted. This issue is easily reproduced when the activity goes to the background and android terminates it and than comes back to the foreground... Any clues how to remove the intent data completely so that I don't get repeated requests when this scenario is seen? -Moto On Jan 20, 6:49 pm, Moto medicalsou...@gmail.com wrote: I currently make my activity support few different MIME types and I receive the request at onCreate() than I do the following to actually get the request: String data = getIntent().getDataString(); String type = getIntent().getType(); Once I get the request, I remove the request from the intent so that every time the onCreate get's called I don't process that request again: this.getIntent().setDataAndType(Uri.parse(), ); this.getIntent().removeExtra(data); this.getIntent().removeExtra(type); Currently this works but if the activity goes to the background and eventually get's terminated and I return the activity to the foreground the request returns data from the previous request... Why? How can I remove a request completely? On screen rotation I don't get the request any longer... so what's up with activity being restarted request shows up again? Thanks! -Moto -- 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] android-developers,蔡明洋 先生 想跟您聊天
我使用 Google Talk 已经有一段时间,我觉得您也不妨试试。我们可以使用它通过互联网免费拨打电话。您可通过此邀请函下载 Google Talk。试试吧! --- 蔡明洋先生希望通过 Google 的一些最炫的新产品与您保持更密切的联系。 如果您已经拥有 Gmail 或 Google Talk,请访问: http://mail.google.com/mail/b-b5e0e0e8fd-d92e8b143f-870354039e66a981 您需要点击此链接才能与蔡明洋先生聊天。 要获取 Gmail(Google 提供的免费电子邮件帐户,存储空间超过 2,800 MB)并与蔡明洋先生聊天,请访问: http://mail.google.com/mail/a-b5e0e0e8fd-d92e8b143f-870354039e66a981 Gmail 提供以下功能: - 直接在 Gmail 中进行即时消息传递 - 强大的垃圾邮件防护功能 - 可用于查找邮件的内置搜索功能,以及实用的邮件整理方法(将邮件整理到“会话”中) - 没有弹出式广告或不相干的横幅广告,只显示文字广告和与邮件内容相关的信息 以上所有功能均免费为您提供。此外,我们还提供了更多服务!打开 Gmail 帐户后,您还可以访问 Google Talk(即时消息传输服务): http://www.google.com/talk/intl/zh-CN/ Google Talk 提供以下功能: - 无需下载即可供您在任何地方使用的基于网络的聊天功能 - 与 Gmail 帐户同步的联系人列表 - 免费、高品质的 PC 间语音呼叫服务(下载 Google Talk 客户端后) 我们一直致力于增加新的功能并不断改进服务,因此我们还可能会定期请您提供意见和建议。感谢您为我们的产品改进所提供的帮助! 此致 Google 小组敬上 要了解有关 Gmail 和 Google Talk 的详细信息,请访问: http://mail.google.com/mail/help/intl/zh_CN/about.html http://www.google.com/talk/intl/zh-CN/about.html (如果点击本邮件中提供的网址不起作用,请将其复制并粘贴到浏览器的地址栏中)。 -- 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] Is that a system bug?
I set an alram that is launched at 7:00 erevy workday. But it doesn't work on Monday only if I disable and enable it before. Does anyone meet the same problem as mine? -- 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: unit testing
Hi Christine, This presentation is very brief but could help: http://www.slideshare.net/dtmilano/testing-on-android On Jan 26, 12:44 am, Christine christine.kar...@gmail.com wrote: Thanks for the replies. Actually, I'm not stuck with testing, I use android unit testing and I'm quite satisfied with it. Right now I'm looking for a good intro on Android unit testing for a coworker. On Jan 26, 12:25 am, Fred Grott(Android Expert,http://mobilebytes.wordpress.com) fred.gr...@gmail.com wrote: you can only use those mocks supplied by google Sdk..not mockkit.. What areas are you getting stuck at? On Jan 25, 1:33 pm, ko5tik kpriblo...@yahoo.com wrote: On Jan 25, 5:38 pm, Christine christine.kar...@gmail.com wrote: I need a reference to an introduction to Android unit testing for a coworker, but the SDK docs don't seem to provide an introduction. I myself used the apidemos and the api docs, but I was wondering if there's a concise intro to Android unit testing? Well, there is at least some support for unit testing in IDEA plugin, but testing occurs only on device or emulator (sloow...) - as libraries used to compile against contain merely stubs However, you can employ mock frameworks ( I played around today ) - but you have to use something really powerfull ( I stuck with mockit , as jmock has problems in mocking concrete final classes ) -- 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: Fwd: [android-developers] androidmarket search
http://developer.android.com/intl/de/guide/publishing/publishing.html#marketintent On Jan 25, 6:23 pm, David Toledo dtole...@gmail.com wrote: Hi I need is redirect to androidmarket and find some my application. I found one android application similar. thanks David -- Forwarded message -- From: Mark Murphy mmur...@commonsware.com Date: 2010/1/25 Subject: Re: [android-developers] androidmarket search To: android-developers@googlegroups.com DAVIDT wrote: How to search on the androidmarket from my Application I do not believe there is an API for that. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training: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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp://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] Update SQLite Database from other app
Hi All Is possible update the records from SQLite from my Android Application1 from other Application2 Android Thanks David -- 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] Update SQLite Database from other app
if your application1's db is implemented by contentprovider, the application2 can access the records. 2010/1/26 David Toledo dtole...@gmail.com Hi All Is possible update the records from SQLite from my Android Application1 from other Application2 Android Thanks David -- 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] Simple Video enhance demo
Hi All, I have done some video enhance algorithms and I want to create one simple demo to show them. Firstly I want to use Android media play framework but I found it is hard to get YUV data and do some post- process before it display. Can someone provide me some hints to find to help me to create a simple media play enhance demo quickly? Thanks, Ji -- 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] android-developers,蔡明 洋先生 想跟您聊天
Hmmm googlers are also spamming others 2010/1/25 蔡明洋先生 fuyouccch...@gmail.com: 我使用 Google Talk 已经有一段时间,我觉得您也不妨试试。我们可以使用它通过互联网免费拨打电话。您可通过此邀请函下载 Google Talk。试试吧! --- 蔡明洋先生希望通过 Google 的一些最炫的新产品与您保持更密切的联系。 如果您已经拥有 Gmail 或 Google Talk,请访问: http://mail.google.com/mail/b-b5e0e0e8fd-d92e8b143f-870354039e66a981 您需要点击此链接才能与蔡明洋先生聊天。 要获取 Gmail(Google 提供的免费电子邮件帐户,存储空间超过 2,800 MB)并与蔡明洋先生聊天,请访问: http://mail.google.com/mail/a-b5e0e0e8fd-d92e8b143f-870354039e66a981 Gmail 提供以下功能: - 直接在 Gmail 中进行即时消息传递 - 强大的垃圾邮件防护功能 - 可用于查找邮件的内置搜索功能,以及实用的邮件整理方法(将邮件整理到“会话”中) - 没有弹出式广告或不相干的横幅广告,只显示文字广告和与邮件内容相关的信息 以上所有功能均免费为您提供。此外,我们还提供了更多服务!打开 Gmail 帐户后,您还可以访问 Google Talk(即时消息传输服务): http://www.google.com/talk/intl/zh-CN/ Google Talk 提供以下功能: - 无需下载即可供您在任何地方使用的基于网络的聊天功能 - 与 Gmail 帐户同步的联系人列表 - 免费、高品质的 PC 间语音呼叫服务(下载 Google Talk 客户端后) 我们一直致力于增加新的功能并不断改进服务,因此我们还可能会定期请您提供意见和建议。感谢您为我们的产品改进所提供的帮助! 此致 Google 小组敬上 要了解有关 Gmail 和 Google Talk 的详细信息,请访问: http://mail.google.com/mail/help/intl/zh_CN/about.html http://www.google.com/talk/intl/zh-CN/about.html (如果点击本邮件中提供的网址不起作用,请将其复制并粘贴到浏览器的地址栏中)。 -- 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-x86 http://www.android-x86.org -- 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: Orientation change crash in tab activity with list activity.
Using ListActivity ExpandableListActivity at the same in one tab activity. is just an example of crash in tabs. The crash still happens when you use ListView and ExpandableListView as the contents of the tabs, not activities. Another example here. (I modified tabs1.xml from ApiDemos.) ListView android:id=@+id/view1 android:layout_width=fill_parent android:layout_height=fill_parent/ LinearLayout android:id=@+id/view2 android:background=@drawable/red android:layout_width=fill_parent android:layout_height=fill_parent ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout LinearLayout android:id=@+id/view3 android:background=@drawable/blue android:layout_width=fill_parent android:layout_height=fill_parent ExpandableListView android:id=@android:id/list android:background=@drawable/green android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout On Jan 21, 5:50 pm, Mark Murphy mmur...@commonsware.com wrote: This means we cannot use ListActivity ExpandableListActivit at the same in one tab activity. Presumably not, if your analysis is correct, and I suspect it is. To get the visual effect you want, use ListView and ExpandableListView as the contents of the tabs, not activities. Then, you can provide them with unique widget IDs. You will save memory, save CPU time, save battery life, reduce the odds that you will encounter a StackOverflowException for having too complicated of a UI, and solve this problem, all at the same time. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android 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: PackageManage: Couldn't copy package file to temp file.
I recently saw several of the same issues that happened to the apps I renamed. A little bit frustrated since couldn't find any answer on the web. After trial-and-error, I got it to work from doing it through command-line by adb install .apkThat might not be a good solution, but at least I can survive for now. On Jan 12, 7:34 pm, Mark Murphy mmur...@commonsware.com wrote: Klaus Kartou wrote: The *.apk is about 0.9 MB and 2.0 MB when installed. I have 19 MB internal phone storage available. It stopped working on 2 dev phones at the same time...looks like its not a storage problem? Looking at some source code, it feels like there's not enough space in the /data partition for a copy of the APK. Why that is, I can't say -- hopefully, someone on the core Android team can chime in. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Development Wiki:http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups Android 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] Rectangular box around link
Hi, In android-sdk emulator, we have a default browser. Suppose I opened any site in that browser. Whenever I click on any link in browser webpage, I can see a rectangular box around that link. Could anyone tell me how that is implemented ? Any suggestions will be appreciated. Thanks, Vivek -- 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: list - need suggestion
so, each sub-lists should be created as list activity. On selecting any item, should call that particular list activity. Is my understanding correct? Also, how to store parent list in the stack? so that on pressing escape key, I can navigate backwards. Thanks On Tue, Jan 26, 2010 at 9:11 AM, saad bouchehboun bsaad1...@gmail.comwrote: your item must be a listactivity , when you add it to your parent list , the UI is adapted automaticly . On 25 jan, 06:24, android beginner android.beginne...@gmail.com wrote: Hi, My Activity has list of items and on clicking any item, new window with different set of list has to appear and this can continue upto 4 or 5 level depths. I need your expert advice on how to achieve this. Can I have each sub-list to be of separate activity? If there are any online examples matching this requirement, please let me know. Thank -- 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: cocos2d for Android updated: Please help test on real phone.
The parallax code has been refactored to use a ParallaxNode. I've also udpated the ParallaxDemo test. Please check it out and let me know. Thanks, Philip On Jan 20, 12:34 am, Lance Nanek lna...@gmail.com wrote: I tested out the debug build from the site on my G1 phone running the OTA Android 1.6 firmware:http://cocos2d-android.googlecode.com/files/Cocos2D-debug.apk AtlasSpriteTest, AtlasTest, ClickAndMoveTest, CocosNodeTest, MenuTest, MotionStreakTest, SceneTest, SpritesTest showed white squares where I would expect textures:http://i.imgur.com/3w3En.png Some of DrawPrimitivesTest works:http://i.imgur.com/Es2H7.png ParallaxTest crashed: W/dalvikvm( 9532): threadid=3: thread exiting with uncaught exception (group=0x4001da28) E/AndroidRuntime( 9532): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 9532): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.cocos2d/org.cocos2d.tests.ParallaxTest}: java.lang.NullPointerException E/AndroidRuntime( 9532): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2401) E/AndroidRuntime( 9532): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2417) E/AndroidRuntime( 9532): at android.app.ActivityThread.access$2100 (ActivityThread.java:116) E/AndroidRuntime( 9532): at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1794) E/AndroidRuntime( 9532): at android.os.Handler.dispatchMessage (Handler.java:99) E/AndroidRuntime( 9532): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime( 9532): at android.app.ActivityThread.main (ActivityThread.java:4203) E/AndroidRuntime( 9532): at java.lang.reflect.Method.invokeNative (Native Method) E/AndroidRuntime( 9532): at java.lang.reflect.Method.invoke (Method.java:521) E/AndroidRuntime( 9532): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) E/AndroidRuntime( 9532): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:549) E/AndroidRuntime( 9532): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime( 9532): Caused by: java.lang.NullPointerException E/AndroidRuntime( 9532): at org.cocos2d.nodes.CocosNode.addChild (CocosNode.java:336) E/AndroidRuntime( 9532): at org.cocos2d.tests.ParallaxTest.onStart (ParallaxTest.java:236) E/AndroidRuntime( 9532): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java: 1205) E/AndroidRuntime( 9532): at android.app.Activity.performStart (Activity.java:3519) E/AndroidRuntime( 9532): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2373) E/AndroidRuntime( 9532): ... 11 more I/Process ( 79): Sending signal. PID: 9532 SIG: 3 RotateWorldTest:http://i.imgur.com/Nfkzv.png SpritesTest and SceneTest wouldn't start about half the time I tried them: Sorry! ActivityCocos2D(in applicationCocos2D) is not responding. Log was this message repeated very many times: W/SurfaceComposerClient( 9576): lock_layer timed out (is the CPU pegged?) layer=1, lcblk=0x420c40a0, state=0043 (was 0043) W/SurfaceComposerClient( 9576): lock_layer timed out (is the CPU pegged?) layer=1, lcblk=0x420c40a0, state=0043 (was 0043) W/SurfaceComposerClient( 9576): lock_layer timed out (is the CPU pegged?) layer=1, lcblk=0x420c40a0, state=0043 (was 0043) W/SurfaceComposerClient( 9576): lock_layer timed out (is the CPU pegged?) layer=1, lcblk=0x420c40a0, state=0043 (was 0043) W/SurfaceComposerClient( 9576): lock_layer timed out (is the CPU pegged?) layer=1, lcblk=0x420c40a0, state=0043 (was 0043) I was talking to someone who usedcocos2don the iPhone recently. It sounded like he got a lot of great functionality without having to implement it himself: particle systems, sprites with acceleration/ physics, plugins for facebook/twitter. It would be great to see it make it to Android. Thanks for putting in the work so far. On Jan 20, 2:13 am, Philip philip.dese...@gmail.com wrote: New release fixes a bunch of problems with transitions, menus, events, and sprite rendering. Code is released under BSD license and available for download here: http://code.google.com/p/cocos2d-android/source/browse/#svn/trunk I am doing development on a Mac emulator so I would really appreciate if you guys can download the code or prebuild package and test it on a real phone. Thanks! Philip -- 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: avcrp motorola ht820
so the interesting thing is that this works fine on a Nexus One - so could it be related to some bluetooth profile I need to have installed on the phone?? On Jan 25, 7:58 am, sdphil phil.pellouch...@gmail.com wrote: i am trying to catch the physical button events on a motorola ht820 bluetooth headset and it i cannot seem to trap those events. the media player on the device *is* able to catch those events. based, on what I've read and googled for, it seems like this should do the trick -- rec = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { KeyEvent event = (KeyEvent) intent.getParcelableExtra (Intent.EXTRA_KEY_EVENT); if (event != null event.getAction() == KeyEvent.ACTION_DOWN) { switch (event.getKeyCode()) { case KeyEvent.KEYCODE_HEADSETHOOK: case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE: getInstance().playpause(); abortBroadcast(); break; case KeyEvent.KEYCODE_MEDIA_STOP: getInstance().stop(true); abortBroadcast(); break; case KeyEvent.KEYCODE_MEDIA_NEXT: getInstance().next(); abortBroadcast(); break; case KeyEvent.KEYCODE_VOLUME_UP: AudioManager audioMgrUp = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audioMgrUp.adjustStreamVolume( AudioManager.STREAM_MUSIC, AudioManager.ADJUST_RAISE, AudioManager.FLAG_SHOW_UI); break; case KeyEvent.KEYCODE_VOLUME_DOWN: AudioManager audioMgrDown = (AudioManager) getSystemService(Context.AUDIO_SERVICE); audioMgrDown.adjustStreamVolume( AudioManager.STREAM_MUSIC, AudioManager.ADJUST_LOWER, AudioManager.FLAG_SHOW_UI); break; } } } }; // Use a separate receiver for ACTION_MEDIA_BUTTON broadcasts, // since we need to manually adjust its priority (to make sure // we get these intents *before* the media player.) IntentFilter intentFilter = new IntentFilter( Intent.ACTION_MEDIA_BUTTON); but it does not seem to work. Here's what I'm seeing in the logcat. any ideas? tia. 01-25 07:39:53.338: WARN/AudioFlinger(45): write blocked for 54 msecs 01-25 07:39:53.388: ERROR/MediaPlaybackService(652): BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0 01-25 07:39:53.398: WARN/AudioFlinger(45): write blocked for 56 msecs 01-25 07:39:53.428: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.448: INFO/BluetoothA2dpService.cpp(23187): ACVRCP : Remote Pannel Pressed with Channel:0 01-25 07:39:53.458: INFO/BluetoothA2dpService.cpp(23187): Panel Opcode: 0x4c 01-25 07:39:53.498: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.508: VERBOSE/MediaPlaybackService(652): onStart 01-25 07:39:53.518: ERROR/MediaPlaybackService(652): MediaMode:Local 01-25 07:39:53.518: DEBUG/MediaPlaybackService(652): CMDPREVIOUS 01-25 07:39:53.558: ERROR/MediaPlaybackService(652): BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0 01-25 07:39:53.588: WARN/AudioFlinger(45): write blocked for 146 msecs 01-25 07:39:53.658: INFO/BluetoothA2dpService.cpp(23187): ACVRCP : Remote Pannel Released with Channel:0 01-25 07:39:53.668: INFO/BluetoothA2dpService.cpp(23187): Panel Opcode: 0x4c 01-25 07:39:53.698: WARN/AudioFlinger(45): write blocked for 62 msecs 01-25 07:39:53.738: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.968: INFO/BluetoothA2dpService.cpp(23187): ACVRCP : Remote Pannel Pressed with Channel:0 01-25 07:39:53.978: DEBUG/MediaButtonIntentReceiver(652): onReceive 01-25 07:39:53.988: VERBOSE/MediaPlaybackService(652): onStart 01-25 07:39:53.988: ERROR/MediaPlaybackService(652): MediaMode:Local 01-25 07:39:53.988: DEBUG/MediaPlaybackService(652): CMDNEXT 01-25 07:39:53.988: DEBUG/MediaPlaybackService(652): next mPlayOnNextPrev=true 01-25 07:39:54.028: ERROR/MediaPlaybackService(652): BadQueue mPlayListLen : 0 mAlbumListLen : 0 mShrinkAlbumListLen : 0 -- 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] adb doesn't see Nexus on XP-64
I can't get adb to see my Nexus on XP-64. That is, when I run adb devices it lists only the open emulators and not the Nexus. Likewise, Eclipse does not show the Nexus as an available deployment target. Yes, I have the latest USB driver for Nexus. The driver appears to have installed correctly. The device manager shows Android phone Composite Android Interface, as expected. And yes, USB debugging is turned on on the Nexus. My Windows 7 Netbook does not have this problem but I need to use the XP-64 system for development. Please help if you know the solution to this 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
[android-developers] Re: Launching the correct activity on resume
Yes it looks like we have got confused here about what happens when returning to the Home screen (perhaps your issue was the Eclipse feature mentioned in the thread?). In the interests of clearing up quite a bit of misinformation in this thread, this is the what actually happens: Re-launching the Activity from the Home screen returns to the same Task that initially started that Activity (the one where action=MAIN and category=LAUNCHER). But whatever Activity was on top of that old Task is again the foreground Activity (unless clearTaskOnLaunch is set). The Activity listed in the Manifest with category LAUNCHER is NOT the Activity that is active and setting singleTop is not necessary to get this standard behavior. Here is one place that this behavior is outlined - http://developer.android.com/intl/fr/guide/topics/manifest/activity-element.html#clear On Jan 25, 1:08 pm, Josh Hoffman keshis...@gmail.com wrote: Thank you all for your help. I've tried some of the suggestions posted here and it seems like the main thing that was stopping me was not doing a full .apk build prior to each test. I implemented the android:launchMode=singleTop manifest flag, but that didn't actually seem to get me my desired functionality. The only time I ever hit the onNewIntent() execution block was if I hit home from Activity1 and relaunched. Hitting home from Activity2 simply resulted in returning to Activity1 on relaunch. When I tested my app via adb install -l -r myApp.apk, the Android application stack seemed to finally behave itself. If I hit home from Activity2 and relaunch, I return to Activity2 exactly as I left it (thanks largely to Matthias Kaeppler's Droid-Fu and BetterAsyncTask, I might add). Just wanted to post and say that my issues seem to be resolved thanks to this new (if a bit cumbersome) development process of doing a full apk build. Thanks again for all the help! On Jan 24, 10:58 pm, String sterling.ud...@googlemail.com wrote: On Jan 25, 12:54 am, jotobjects jotobje...@gmail.com wrote: If Activity1 and Activity2 are part of the same task and Activity2 is foreground when pressing the Home key, then I thought that choosing that app on the Home screen would return you to Activity2. Something to remember is that choosing that app on the Home screen (or in the Launcher drawer) is really clicking on a shortcut, and that shortcut is specifically to the activity with this in your manifest: intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter It's also true (as another poster said) that installing your app from Eclipse can change what its default activity is. If you want to accurately simulate the behavior that your users will see, you need to build an APK as you would for release, install it through the command line, and see what that does. 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
[android-developers] Re: Orientation change crash in tab activity with list activity.
The crash shouldn't happen regardless. There are a bunch of problems when the orientation changes, I created two bugs reports recently. I wouldn't hold my breath for a quick fix. Obviously, the orientation change behavior hasn't been tested very well. On Jan 26, 12:12 pm, NoraBora noranb...@gmail.com wrote: Using ListActivity ExpandableListActivity at the same in one tab activity. is just an example of crash in tabs. The crash still happens when you use ListView and ExpandableListView as the contents of the tabs, not activities. Another example here. (I modified tabs1.xml from ApiDemos.) ListView android:id=@+id/view1 android:layout_width=fill_parent android:layout_height=fill_parent/ LinearLayout android:id=@+id/view2 android:background=@drawable/red android:layout_width=fill_parent android:layout_height=fill_parent ListView android:id=@android:id/list android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout LinearLayout android:id=@+id/view3 android:background=@drawable/blue android:layout_width=fill_parent android:layout_height=fill_parent ExpandableListView android:id=@android:id/list android:background=@drawable/green android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout On Jan 21, 5:50 pm, Mark Murphy mmur...@commonsware.com wrote: This means we cannot use ListActivity ExpandableListActivit at the same in one tab activity. Presumably not, if your analysis is correct, and I suspect it is. To get the visual effect you want, use ListView and ExpandableListView as the contents of the tabs, not activities. Then, you can provide them with unique widget IDs. You will save memory, save CPU time, save battery life, reduce the odds that you will encounter a StackOverflowException for having too complicated of a UI, and solve this problem, all at the same time. -- Mark Murphy (a Commons Guy)http://commonsware.com Android App Developer Books:http://commonsware.com/books.html- Hide quoted text - - Show quoted text - -- 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: list - need suggestion
On Jan 25, 11:48 pm, android beginner android.beginne...@gmail.com wrote: so, each sub-lists should be created as list activity. On selecting any item, should call that particular list activity. Is my understanding correct? Yes Also, how to store parent list in the stack? so that on pressing escape key, I can navigate backwards. Android does this automatically, and I assume you mean the 'back' key. Each new activity is launched ontop of the older ones allowing you to navigate backwards down the stack. -theSmith Thanks On Tue, Jan 26, 2010 at 9:11 AM, saad bouchehboun bsaad1...@gmail.comwrote: your item must be a listactivity , when you add it to your parent list , the UI is adapted automaticly . On 25 jan, 06:24, android beginner android.beginne...@gmail.com wrote: Hi, My Activity has list of items and on clicking any item, new window with different set of list has to appear and this can continue upto 4 or 5 level depths. I need your expert advice on how to achieve this. Can I have each sub-list to be of separate activity? If there are any online examples matching this requirement, please let me know. Thank -- 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: Using Nexus One as a development phone: Problem with USB driver under windows 7 64 bit
But it doesn't work on XP-64, at least not for me. On Jan 11, 5:45 pm, Mark Murphy mmur...@commonsware.com wrote: 48-New wrote: I'm working on Windows XP using Eclipse. Can't attached theNexusOne either. Saw the xda post below as well but not sure I know how to proceed onces I download and unzip the file. Would appreciate somebody post a more details step by step on getting the driver installed and hence theadbcan detect the connectedNexusOne. Many thnx. Quoting from today's Android 2.1 SDK announcement: In addition to the new SDK, a new USB driver that supportsNexusOne is also available today through the SDK Manager. The USB driver page contains more information. http://developer.android.com/sdk/win-usb.html -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android App Developer Training: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] extra space/padding around imageview?
Hi, I am trying to get the image to consume just enough space and get last_line to be just below the image. but it seems that the image always have some extra space/padding on top and below. Why? ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_height=wrap_content android:layout_width=fill_parent android:orientation=vertical TextView android:layout_height=wrap_content android:layout_width=fill_parent android:text=header / LinearLayout android:orientation=horizontal android:layout_height=wrap_content android:layout_width=fill_parent ImageView android:layout_width=0dip android:layout_height=wrap_content android:scaleType=fitCenter android:layout_weight=1 android:src=@drawable/jayzhou_album_cover_orginal / TextView android:layout_height=wrap_content android:layout_width=0dip android:autoLink=all android:text=a asaa asaa asaa asaa asa android:layout_marginLeft=5dip android:layout_weight=3 / /LinearLayout TextView android:layout_height=wrap_content android:id=@+id/ last_line android:layout_width=fill_parent android:text=another line of text / /LinearLayout -- 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: Using OS 1.6 and Up , are we penalized on the market ?
On Jan 25, 10:56 pm, Dianne Hackborn hack...@android.com wrote: Things can certainly be improved. If you have concrete ideas, I would be happy to hear them. Here's one closely-related feature request that interested devs might like to star: http://code.google.com/p/android/issues/detail?id=5392 It's a request to add a Description field to the permission, allowing devs to explain what their app is doing with a given permission (ie, why it's needed). Another idea which has been discussed before (but which I don't see on b.android.com) is the notion of optional permission. Basically, if your app can function without a given permission, but its functionality will be enhanced if that permission was granted, make it optional and let the user decide if they want to grant it. A good example is WRITE_EXTERNAL_STORAGE; I have a couple of apps which will write temporary files to SD (to conserve phone memory), but will use internal storage if the SD card is unavailable. So WRITE_EXTERNAL_STORAGE could be optional for me, and if the user chose to keep me out of their SD - at the expense of some internal RAM - that's their decision. 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