[android-developers] How can I change my developer's country setting?
Hi, today finally my country is available to sell paid apps, but my account was set to US with invalid informations, so I need to change it now. Eric told me that I can change it once my country becomes available, but I can't find it. Anyone knows how to do it? Thanks! And when can we get a really developer support from Google? Maybe before the world's end? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Unexpected MEDIA_BUTTON action broadcasting when unplugging headset
I'm writing music app, and find a confusing issue about headset buttons. My app has a BroadcastReceiver class to receive headset button controls, with action android:name=android.intent.action.MEDIA_BUTTON/ as intent filter. The problem is, when I unplug a wired headset slowly, sometimes Android will broadcast MEDIA_BUTTON intents with KeyEvent.KEYCODE_HEADSETHOOK. It equals to a normal play/pause button pressing, so my app starts playing automatically. But the default Music app does not come up, and I can't find anything checking or preventing this in the Android source code. Anyone have idea about how to avoid this? Thank you very much! -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 decide widget size in a configure Activity?
Hi, in HTC Sense, we can choose widgets of different size after tapping a single entry in the widget list. Is this also possible in pure Android Framework? I have tried to modify the widget's size in the configure Activity, but failed. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 force MediaStore to rescan the SD card
I'm writing a Video Player and is supposed to cowork with Youtube Downloader, which does not imeplemet MediaScanner when downloading a file. Is the only way for me is to scan whole SD card and update all found files? On 2月18日, 下午12時05分, Dave Sparks davidspa...@android.com wrote: I'm not sure about the process of removing a file from the database. I suggest looking at the Music Player source - it has an option to delete files from the SD card. Under what circumstances would files be deleted without mounting and re-mounting the SD card? That sounds like a poorly behaved app. On Feb 17, 6:03 pm, info.sktechnol...@gmail.com info.sktechnol...@gmail.com wrote: Thanks, this solves my first problem. Now what ifmediafiles are deleted? What if I do not know which ones have been deleted? Is there a way to have it rescan the entire SD card in the way it must do if the card has been removed and reinserted? On Feb 14, 2:01 pm, Dave Sparks davidspa...@android.com wrote: You want something like this in your activity: import android.media.MediaScannerConnection; import android.media.MediaScannerConnection.MediaScannerConnectionClient; private static class MediaScannerNotifier implements MediaScannerConnectionClient { private Context mContext; private MediaScannerConnection mConnection; private String mPath; private String mMimeType; public MediaScannerNotifier(Context context, String path, String mimeType) { mContext = context; mPath = path; mMimeType = mimeType; mConnection = new MediaScannerConnection(context, this); mConnection.connect(); } public void onMediaScannerConnected() { mConnection.scanFile(mPath, mMimeType); } public void onScanCompleted(String path, Uri uri) { // OPTIONAL:scanis complete, this will cause the viewer to render it try { if (uri != null) { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(uri); mContext.startActivity(intent); } } finally { mConnection.disconnect(); mContext = null; } } } Toscana file, you just create a new MediaScannerNotifier: new MediaScannerNotifier(path, mimeType); On Feb 14, 9:45 am, kolby kolbys...@gmail.com wrote: You can make an android.media.MediaScannerConnection, connect to it, and provide a client toscana directory. Michael On Feb 14, 7:05 am, info.sktechnol...@gmail.com info.sktechnol...@gmail.com wrote: If I progammatically store newmediafiles on the SD card, the MediaStore does not know about them until I remove and reinsert the SD card. Is there a way to tell the MediaStore to rescan the SD card without first unmounting the SD card?- 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: the android's built in video player, supports which file format
No matter which video player, they all can only support mp4/3gp and WMV7/8. I'm really sad to get one star because of 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 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 handle orientation changing of VideoView/MediaPlayer?
Hi, I'm writting a Video Player, and I wonder how can I handle orientation changing of VideoView/MediaPlayer. I wrote it without special issues, then it always restart when orientation changes since Activity is destroyed and recreated. But the App Video Player can rotate screen with only a little lag. Does anybody know how he done it? 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: Utterly confounded trying to create horizontal scrolling
I also has this problem. I call setHorizontalScrollBarEnabled(true) for a TextView, but the horizontal scroll bar does not appear at all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: INSTALL_FAILED_UPDATE_INCOMPATIBLE
I'm also stuck at here, this is really terrible... The final way is factory reset, buy I honestly don't want to do it... On 11月4日, 午前12:57, Cheryl Sedota [EMAIL PROTECTED] wrote: What do you mean by uninstall it fully? I did an adb uninstall package name but that does not appear to fully uninstall it :) This is on the G1 so I have no access to the /system or /data folders. Thanks, Cheryl On Nov 3, 10:32 am, Michael [EMAIL PROTECTED] wrote: Did you sign different versions of your app with different keys? I had this error message when I changed from the debug key to a real key, and what I had to do was reinstall the old version, uninstall it fully, then install my new version. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to access native functions in standard library?
Hi, I have a G1, and downloaded the Android source code. When I open, say, android.hardware.Camera.java, it uses native functions without calling loadLibrary(). Of course if I do the same in my application, UnsatisfiedLinkError will come. I tried to load libandroid_runtime.so, but the device just replays there's no such library. Does anyone know what trick the SDK uses, so it can use native functions? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to access native functions in standard library?
Thank you David. Now I can concentrate on other works. On 11月18日, 上午1時18分, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Most JNI functions are registered with the VM during runtime boot. FYI, the 1.0 SDK does not support native code development. If you proceed along this path, be aware that any API's you use are subject to change without notice. On Nov 17, 2:03 am, Urakagi [EMAIL PROTECTED] wrote: Hi, I have a G1, and downloaded the Android source code. When I open, say, android.hardware.Camera.java, it uses native functions without calling loadLibrary(). Of course if I do the same in my application, UnsatisfiedLinkError will come. I tried to load libandroid_runtime.so, but the device just replays there's no such library. Does anyone know what trick the SDK uses, so it can use native functions? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] java.lang.VerifyError in Android
Android uses different Java Compiler with Sun's, so if you build a project with class file(like a compiled jar library) compiled with Sun's Java Compiler that uses classes/interfaces/fields/methods not supported by Android (Actually dakvik), you'll get java.lang.VerifyError. To fix this, you must rewrite or delete such codes. Class Index and Pacakge Index in Android page will help. If the library is not source- opened, it's over and you can now find for another. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use onListItemClick() while overriding dispatchTouchEvent() in ListActivity?
Days pass but I still can't find an answer. I try to trace stack, but I can't understand how the system get position parameter since the source code of SDK is not available: ListView.performItemClick(View, int, long) line: 2968 AbsListView$PerformClick.run() line: 1406 When I call View.PerformClick, SDK says You shouldn't call this. I have a way to call performItemClick directly, but I don't know how to get position on a ListView using MotionEvent information. After all, why if I override ListActivity.dispatchTouchEvent, ListActivity.onListItemClick will become disable? Is this a bug? Should I report it to google? On 9月22日, 下午5時45分, Urakagi [EMAIL PROTECTED] wrote: Oops, I'm wrong, I can't get position. Is there other ways to get position in a ListView using X and Y message in MotionEvent? On 9月22日, 上午9時24分, Urakagi [EMAIL PROTECTED] wrote: That sounds good, but I also have a problem for it. protected void onListItemClick(ListView l, View v, int position, long id) I know ListView, View, and position, but how can I get id? On 9月20日, 上午5時37分, Teo Hong Siang [EMAIL PROTECTED] wrote: Here's my suggestion: If your code indispatchTouchEventcan determine that the gesture is empty, then you can call onListItemClick() withindispatchTouchEvent. If the gesture is not empty, then do whatever you want to do. On Sep 19, 2:45 am, Urakagi [EMAIL PROTECTED] wrote: Um, I want to usedispatchTouchEvent() to implement a gesture system, so I have code like this: public booleandispatchTouchEvent(MotionEvent ev) { boolean rtn = mGesture.onTouchEvent(ev); if (ev.getAction() == MotionEvent.ACTION_UP) { Log.v(dispatch, Gesture= + mGesture.getGestureString()); if(mGesture.getGestureString().equals()) { return super.dispatchTouchEvent(ev); } } return rtn; } which means, if the gesture is empty (indicates a click), I want to do original things like onListItemClick(). But calling super.dispatchTouchEvent(ev); will not trigger onListItemClick(). So what I want to do is: If it's a simple click, call onListItemClick(). Otherwise, calldispatchTouchEvent(). Thanks for replying. (Sorry for my poor English since I'm not a native English speaker) On 9 $B7n (B19 $BF| (B, $B28a (B4 $B;~ (B02 $BJ, (B, hackbod [EMAIL PROTECTED] wrote: Well yes,dispatchTouchEvent() dispatching touch events through the view. If you do this: @Override public booleandispatchTouchEvent(MotionEvent ev) { return super.dispatchTouchEvent(ev); } it will behave exactly the same as if you didn't override the method, so I'm not sure what you mean by it not working. What are you trying to accomplish? On Sep 19, 12:12 am, Urakagi [EMAIL PROTECTED] wrote: Hi, I have a class extending ListActivity, and I want to catch touchevent on it so I overridedispatchTouchEvent. @Override public booleandispatchTouchEvent(MotionEvent ev) { ... } And since it's a ListActivity, of cource I want to override the onListItemClick(), too: @Override protected void onListItemClick(ListView l, View v, int position, long id) { ... } But now I find that thedispatchTouchEvent() will intercept ALL touch event on the activity, so onListItemClick() will never be called. I tried super.dispatchTouchEvent(ev); but it does not work. Anyone has any idea for this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Coordinate difference between pointToPosition() and MotionEvent.getY()
Hi, I have a ListActivity, so I also have a ListView in it. I want to use ListView.pointToPosition() in dispatchTouchEvent() of ListActivity. But when I call MotionEvent.getY(), it returns the Y coordinate of whole screen, but pointToPosition() needs an local coordinate. I tried many getTop() or getPaddingTop or something else, but everyone returns nothing other to 0. Does anyone know how to fix the global coordinate to local coordinate? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use onListItemClick() while overriding dispatchTouchEvent() in ListActivity?
Oops, I'm wrong, I can't get position. Is there other ways to get position in a ListView using X and Y message in MotionEvent? On 9月22日, 上午9時24分, Urakagi [EMAIL PROTECTED] wrote: That sounds good, but I also have a problem for it. protected void onListItemClick(ListView l, View v, int position, long id) I know ListView, View, and position, but how can I get id? On 9月20日, 上午5時37分, Teo Hong Siang [EMAIL PROTECTED] wrote: Here's my suggestion: If your code indispatchTouchEventcan determine that the gesture is empty, then you can call onListItemClick() withindispatchTouchEvent. If the gesture is not empty, then do whatever you want to do. On Sep 19, 2:45 am, Urakagi [EMAIL PROTECTED] wrote: Um, I want to usedispatchTouchEvent() to implement a gesture system, so I have code like this: public booleandispatchTouchEvent(MotionEvent ev) { boolean rtn = mGesture.onTouchEvent(ev); if (ev.getAction() == MotionEvent.ACTION_UP) { Log.v(dispatch, Gesture= + mGesture.getGestureString()); if(mGesture.getGestureString().equals()) { return super.dispatchTouchEvent(ev); } } return rtn; } which means, if the gesture is empty (indicates a click), I want to do original things like onListItemClick(). But calling super.dispatchTouchEvent(ev); will not trigger onListItemClick(). So what I want to do is: If it's a simple click, call onListItemClick(). Otherwise, calldispatchTouchEvent(). Thanks for replying. (Sorry for my poor English since I'm not a native English speaker) On 9 $B7n (B19 $BF| (B, $B28a (B4 $B;~ (B02 $BJ, (B, hackbod [EMAIL PROTECTED] wrote: Well yes,dispatchTouchEvent() dispatching touch events through the view. If you do this: @Override public booleandispatchTouchEvent(MotionEvent ev) { return super.dispatchTouchEvent(ev); } it will behave exactly the same as if you didn't override the method, so I'm not sure what you mean by it not working. What are you trying to accomplish? On Sep 19, 12:12 am, Urakagi [EMAIL PROTECTED] wrote: Hi, I have a class extending ListActivity, and I want to catch touchevent on it so I overridedispatchTouchEvent. @Override public booleandispatchTouchEvent(MotionEvent ev) { ... } And since it's a ListActivity, of cource I want to override the onListItemClick(), too: @Override protected void onListItemClick(ListView l, View v, int position, long id) { ... } But now I find that thedispatchTouchEvent() will intercept ALL touch event on the activity, so onListItemClick() will never be called. I tried super.dispatchTouchEvent(ev); but it does not work. Anyone has any idea for this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use onListItemClick() while overriding dispatchTouchEvent() in ListActivity?
That sounds good, but I also have a problem for it. protected void onListItemClick(ListView l, View v, int position, long id) I know ListView, View, and position, but how can I get id? On 9月20日, 上午5時37分, Teo Hong Siang [EMAIL PROTECTED] wrote: Here's my suggestion: If your code in dispatchTouchEvent can determine that the gesture is empty, then you can call onListItemClick() within dispatchTouchEvent. If the gesture is not empty, then do whatever you want to do. On Sep 19, 2:45 am, Urakagi [EMAIL PROTECTED] wrote: Um, I want to use dispatchTouchEvent() to implement a gesture system, so I have code like this: public boolean dispatchTouchEvent(MotionEvent ev) { boolean rtn = mGesture.onTouchEvent(ev); if (ev.getAction() == MotionEvent.ACTION_UP) { Log.v(dispatch, Gesture= + mGesture.getGestureString()); if(mGesture.getGestureString().equals()) { return super.dispatchTouchEvent(ev); } } return rtn; } which means, if the gesture is empty (indicates a click), I want to do original things like onListItemClick(). But calling super.dispatchTouchEvent(ev); will not trigger onListItemClick(). So what I want to do is: If it's a simple click, call onListItemClick(). Otherwise, call dispatchTouchEvent(). Thanks for replying. (Sorry for my poor English since I'm not a native English speaker) On 9 $B7n (B19 $BF| (B, $B28a (B4 $B;~ (B02 $BJ, (B, hackbod [EMAIL PROTECTED] wrote: Well yes, dispatchTouchEvent() dispatching touch events through the view. If you do this: @Override public boolean dispatchTouchEvent(MotionEvent ev) { return super.dispatchTouchEvent(ev); } it will behave exactly the same as if you didn't override the method, so I'm not sure what you mean by it not working. What are you trying to accomplish? On Sep 19, 12:12 am, Urakagi [EMAIL PROTECTED] wrote: Hi, I have a class extending ListActivity, and I want to catch touchevent on it so I override dispatchTouchEvent. @Override public boolean dispatchTouchEvent(MotionEvent ev) { ... } And since it's a ListActivity, of cource I want to override the onListItemClick(), too: @Override protected void onListItemClick(ListView l, View v, int position, long id) { ... } But now I find that the dispatchTouchEvent() will intercept ALL touch event on the activity, so onListItemClick() will never be called. I tried super.dispatchTouchEvent(ev); but it does not work. Anyone has any idea for this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to use onListItemClick() while overriding dispatchTouchEvent() in ListActivity?
Hi, I have a class extending ListActivity, and I want to catch touchevent on it so I override dispatchTouchEvent. @Override public boolean dispatchTouchEvent(MotionEvent ev) { ... } And since it's a ListActivity, of cource I want to override the onListItemClick(), too: @Override protected void onListItemClick(ListView l, View v, int position, long id) { ... } But now I find that the dispatchTouchEvent() will intercept ALL touch event on the activity, so onListItemClick() will never be called. I tried super.dispatchTouchEvent(ev); but it does not work. Anyone has any idea for this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to use onListItemClick() while overriding dispatchTouchEvent() in ListActivity?
Um, I want to use dispatchTouchEvent() to implement a gesture system, so I have code like this: public boolean dispatchTouchEvent(MotionEvent ev) { boolean rtn = mGesture.onTouchEvent(ev); if (ev.getAction() == MotionEvent.ACTION_UP) { Log.v(dispatch, Gesture= + mGesture.getGestureString()); if(mGesture.getGestureString().equals()) { return super.dispatchTouchEvent(ev); } } return rtn; } which means, if the gesture is empty (indicates a click), I want to do original things like onListItemClick(). But calling super.dispatchTouchEvent(ev); will not trigger onListItemClick(). So what I want to do is: If it's a simple click, call onListItemClick(). Otherwise, call dispatchTouchEvent(). Thanks for replying. (Sorry for my poor English since I'm not a native English speaker) On 9 $B7n (B19 $BF| (B, $B28a (B4 $B;~ (B02 $BJ, (B, hackbod [EMAIL PROTECTED] wrote: Well yes, dispatchTouchEvent() dispatching touch events through the view. If you do this: @Override public boolean dispatchTouchEvent(MotionEvent ev) { return super.dispatchTouchEvent(ev); } it will behave exactly the same as if you didn't override the method, so I'm not sure what you mean by it not working. What are you trying to accomplish? On Sep 19, 12:12 am, Urakagi [EMAIL PROTECTED] wrote: Hi, I have a class extending ListActivity, and I want to catch touchevent on it so I override dispatchTouchEvent. @Override public boolean dispatchTouchEvent(MotionEvent ev) { ... } And since it's a ListActivity, of cource I want to override the onListItemClick(), too: @Override protected void onListItemClick(ListView l, View v, int position, long id) { ... } But now I find that the dispatchTouchEvent() will intercept ALL touch event on the activity, so onListItemClick() will never be called. I tried super.dispatchTouchEvent(ev); but it does not work. Anyone has any idea for this? 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---