[android-developers] Re: Streaming MP3 Playback Problems on Android 2.2
Just got the Android 2.2.1 update on the Nexus one and this bug is still not fixed. What should I do now Google? On Sep 20, 8:54 am, jdeslip jdes...@gmail.com wrote: Well, if you Google for pandora froyo you get a ton of pages with people having this problem (at least I believe it to be the same). One particularly insightful link is here:http://forum.xda-developers.com/showthread.php?t=737111 where they show you can fix the problem by reverting to the old OpenCore engine instead of the new StageFright media engine used in 2.2. This can only be done on rooted phones however... There is alos this article:http://www.androidcentral.com/sirius-xm-app-updated-fix-froyo-bug - Apparently sirius app had this problem and fixed it somehow. Probably by changing the format to a lower bitrate on their server or something which is not available to me in my emusic app. I wish someone from the Android team would comment here and let us know what the appropriate route to take is. Is there a workaround we can implement now? Is an updated froyo release on the way for affected devices? On Sep 19, 11:07 pm, Ben Pellow benjamin.pel...@gmail.com wrote: I'm seeing this issue as well, and only with 2.2. I've seen it with the emulator, droid x, nexus one and moto droid. It happens lot more to me (10x+) with high bitrate streams than low ones (320 vs 120 kbps mp3). It seems intermittent and I can find nothing on the web posted about it other than this thread. It is a real problem with media apps running in 2.2. The constant -2147483648 always appears with this MediaPlayer error, and could probably be tracked down in the source. The problem is not with eMusic or the stream. I have seen the same issue with streams hosted by other services. On Sep 18, 12:51 pm, jdeslip jdes...@gmail.com wrote: Yes, it works fine on 2.1 and below. This is almost certainly related to the problems the Pandora/Last.fm etc.. apps have on 2.2. I just want to find out what the recommended tactic for developers with this problem is. Is Google on verge of releasing an update 2.2? Or is there an official workaround? On Sep 17, 11:58 pm, Indicator Veritatis mej1...@yahoo.com wrote: If that were the problem, then why would it work under 1.5 and fail under 2.2? On Sep 17, 8:50 pm, Doug beafd...@gmail.com wrote: Have you considered that eMusic might be doing something on the server side to prevent the stream from working? Many sites that stream things will leave urls active for a limited time or require you to preserve an HTTP session. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Streaming MP3 Playback Problems on Android 2.2
Well, if you Google for pandora froyo you get a ton of pages with people having this problem (at least I believe it to be the same). One particularly insightful link is here: http://forum.xda-developers.com/showthread.php?t=737111 where they show you can fix the problem by reverting to the old OpenCore engine instead of the new StageFright media engine used in 2.2. This can only be done on rooted phones however... There is alos this article: http://www.androidcentral.com/sirius-xm-app-updated-fix-froyo-bug - Apparently sirius app had this problem and fixed it somehow. Probably by changing the format to a lower bitrate on their server or something which is not available to me in my emusic app. I wish someone from the Android team would comment here and let us know what the appropriate route to take is. Is there a workaround we can implement now? Is an updated froyo release on the way for affected devices? On Sep 19, 11:07 pm, Ben Pellow benjamin.pel...@gmail.com wrote: I'm seeing this issue as well, and only with 2.2. I've seen it with the emulator, droid x, nexus one and moto droid. It happens lot more to me (10x+) with high bitrate streams than low ones (320 vs 120 kbps mp3). It seems intermittent and I can find nothing on the web posted about it other than this thread. It is a real problem with media apps running in 2.2. The constant -2147483648 always appears with this MediaPlayer error, and could probably be tracked down in the source. The problem is not with eMusic or the stream. I have seen the same issue with streams hosted by other services. On Sep 18, 12:51 pm, jdeslip jdes...@gmail.com wrote: Yes, it works fine on 2.1 and below. This is almost certainly related to the problems the Pandora/Last.fm etc.. apps have on 2.2. I just want to find out what the recommended tactic for developers with this problem is. Is Google on verge of releasing an update 2.2? Or is there an official workaround? On Sep 17, 11:58 pm, Indicator Veritatis mej1...@yahoo.com wrote: If that were the problem, then why would it work under 1.5 and fail under 2.2? On Sep 17, 8:50 pm, Doug beafd...@gmail.com wrote: Have you considered that eMusic might be doing something on the server side to prevent the stream from working? Many sites that stream things will leave urls active for a limited time or require you to preserve an HTTP session. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Streaming MP3 Playback Problems on Android 2.2
Yes, it works fine on 2.1 and below. This is almost certainly related to the problems the Pandora/Last.fm etc.. apps have on 2.2. I just want to find out what the recommended tactic for developers with this problem is. Is Google on verge of releasing an update 2.2? Or is there an official workaround? On Sep 17, 11:58 pm, Indicator Veritatis mej1...@yahoo.com wrote: If that were the problem, then why would it work under 1.5 and fail under 2.2? On Sep 17, 8:50 pm, Doug beafd...@gmail.com wrote: Have you considered that eMusic might be doing something on the server side to prevent the stream from working? Many sites that stream things will leave urls active for a limited time or require you to preserve an HTTP session. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Streaming MP3 Playback Problems on Android 2.2
Since there is still no fix to the Froyo audio streaming problems, what is a dev like me supposed to do? Anyone (particularly from Google) have any ideas? On Aug 18, 9:07 pm, jdeslip jdes...@gmail.com wrote: Here is my one shameless bump. Anyone have any idea if there is anything I can actively do to fix this on Android 2.2? On Aug 14, 2:03 pm, jdeslip jdes...@gmail.com wrote: I'm developing an app that streams some audio samples from eMusic.com. I basically use the MediaPlayer class to play back the sample.mp3 from a particular URL (I do use prepareAsync). On Android 1.6-2.1, the playback is fine, however on Android 2.2 (both the emulator and Nexus One) the playback contains tinny artifacts and often dies with an error like: I/AwesomePlayer( 34): calling prefetcher-prepare() I/Prefetcher( 34): [0x175f8] cache below low water mark, filling cache. I/AwesomePlayer( 34): prefetcher is done preparing E/EMD - ( 293): Duration 0 D/AudioSink( 34): bufferCount (4) is too small and increased to 12 E/MediaPlayer( 293): error (1, -2147483648) E/MediaPlayer( 293): Error (1,-2147483648) In case someone wants to try to reproduce this. Download the filehttp://www.emusic.com/samples/m3u/song/12039152/23641389.m3uonthe 3rd line you will find the address to a mp3 file that can be played back with MediaPlayer. I know that there is a known issue with streaming apps like pandora/ last.fm in 2.2. However, I thought those were related to AAC. Do you think my issue is connected - if so (or not so), is there anything I can do right now to resolve the issue? Or do I have to just wait for a new Android release? Thanks for any help! -Jack -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Streaming MP3 Playback Problems on Android 2.2
Here is my one shameless bump. Anyone have any idea if there is anything I can actively do to fix this on Android 2.2? On Aug 14, 2:03 pm, jdeslip jdes...@gmail.com wrote: I'm developing an app that streams some audio samples from eMusic.com. I basically use the MediaPlayer class to play back the sample.mp3 from a particular URL (I do use prepareAsync). On Android 1.6-2.1, the playback is fine, however on Android 2.2 (both the emulator and Nexus One) the playback contains tinny artifacts and often dies with an error like: I/AwesomePlayer( 34): calling prefetcher-prepare() I/Prefetcher( 34): [0x175f8] cache below low water mark, filling cache. I/AwesomePlayer( 34): prefetcher is done preparing E/EMD - ( 293): Duration 0 D/AudioSink( 34): bufferCount (4) is too small and increased to 12 E/MediaPlayer( 293): error (1, -2147483648) E/MediaPlayer( 293): Error (1,-2147483648) In case someone wants to try to reproduce this. Download the filehttp://www.emusic.com/samples/m3u/song/12039152/23641389.m3uon the 3rd line you will find the address to a mp3 file that can be played back with MediaPlayer. I know that there is a known issue with streaming apps like pandora/ last.fm in 2.2. However, I thought those were related to AAC. Do you think my issue is connected - if so (or not so), is there anything I can do right now to resolve the issue? Or do I have to just wait for a new Android release? Thanks for any help! -Jack -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Streaming MP3 Playback Problems on Android 2.2
I'm developing an app that streams some audio samples from eMusic.com. I basically use the MediaPlayer class to play back the sample.mp3 from a particular URL (I do use prepareAsync). On Android 1.6-2.1, the playback is fine, however on Android 2.2 (both the emulator and Nexus One) the playback contains tinny artifacts and often dies with an error like: I/AwesomePlayer( 34): calling prefetcher-prepare() I/Prefetcher( 34): [0x175f8] cache below low water mark, filling cache. I/AwesomePlayer( 34): prefetcher is done preparing E/EMD - ( 293): Duration 0 D/AudioSink( 34): bufferCount (4) is too small and increased to 12 E/MediaPlayer( 293): error (1, -2147483648) E/MediaPlayer( 293): Error (1,-2147483648) In case someone wants to try to reproduce this. Download the file http://www.emusic.com/samples/m3u/song/12039152/23641389.m3u on the 3rd line you will find the address to a mp3 file that can be played back with MediaPlayer. I know that there is a known issue with streaming apps like pandora/ last.fm in 2.2. However, I thought those were related to AAC. Do you think my issue is connected - if so (or not so), is there anything I can do right now to resolve the issue? Or do I have to just wait for a new Android release? Thanks for any help! -Jack -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Add Media Files to Library in Froyo
It turns out when I added a file on /sdcard, they were not added. When I add using the /mnt/sdcard path it worked fine. Both paths seem valid (I guess one is a symlink) but only the /mnt/sdcard adds the file to my library right away. It appears you can get the right pathname using: Environment.getExternalStorageDirectory() -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Add Media Files to Library in Froyo
So, the amazonmp3 app does manage to get its downloads added to the library immediately (even 2.2); so it must be doable. Sorry to bump this again, but this is still driving me crazy. Anyone have any ideas or know how that amazonmp3 interacts with the media scanner? On Jul 7, 8:58 pm, jdeslip jdes...@gmail.com wrote: I tried with the new API: MediaScannerConnection.scanFile(EMD.context,names,types,null); ...and it still does not add the files to the music library. Is media scanning just broken in Android 2.2??? The files are actually added to my library if I restart the phone or unmount/mount the sdcard. But in 2.1 and below, they are added to the music library immediately using the above code. Anyone got any ideas/suggestions? On Jul 7, 4:55 pm, jdeslip jdes...@gmail.com wrote: I have develop and app that downloads music files and should add them to the music library. I use the following class to do this: public 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() { Log.e(SCANNER,SCAN CONNECTED); mConnection.scanFile(mPath, mMimeType); } public void onScanCompleted(String path, Uri uri) { Log.e(SCANNER,SCAN COMPLETED +path+ +uri); mConnection.disconnect(); mContext = null; } } Everything works ok with android 2.1 and below. But, in android 2.2, the media files do not get added to my music library. :( I know there were some changes in froyo API for music scanning, but I am unsure why the above no longer works. By the way, everything seems to scan fine - i.e. I get ok log messages - E/SCANNER ( 339): SCAN COMPLETED /sdcard/EMusic/Josh Woodward/ Breadcrumbs/TheVoices.mp3 content://media/internal/audio/media/4 Any idea on what to change to make media scanning work again in froyo? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Add Media Files to Library in Froyo
OK - this issue appears to be fixed in SDK 2.2 Revision 2 (it was broken in Revision 1) - but it is still not working on FRF91 on the Nexus one. Is another update coming to the N1? On Jul 8, 8:35 am, jdeslip jdes...@gmail.com wrote: So, the amazonmp3 app does manage to get its downloads added to the library immediately (even 2.2); so it must be doable. Sorry to bump this again, but this is still driving me crazy. Anyone have any ideas or know how that amazonmp3 interacts with the media scanner? On Jul 7, 8:58 pm, jdeslip jdes...@gmail.com wrote: I tried with the new API: MediaScannerConnection.scanFile(EMD.context,names,types,null); ...and it still does not add the files to the music library. Is media scanning just broken in Android 2.2??? The files are actually added to my library if I restart the phone or unmount/mount the sdcard. But in 2.1 and below, they are added to the music library immediately using the above code. Anyone got any ideas/suggestions? On Jul 7, 4:55 pm, jdeslip jdes...@gmail.com wrote: I have develop and app that downloads music files and should add them to the music library. I use the following class to do this: public 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() { Log.e(SCANNER,SCAN CONNECTED); mConnection.scanFile(mPath, mMimeType); } public void onScanCompleted(String path, Uri uri) { Log.e(SCANNER,SCAN COMPLETED +path+ +uri); mConnection.disconnect(); mContext = null; } } Everything works ok with android 2.1 and below. But, in android 2.2, the media files do not get added to my music library. :( I know there were some changes in froyo API for music scanning, but I am unsure why the above no longer works. By the way, everything seems to scan fine - i.e. I get ok log messages - E/SCANNER ( 339): SCAN COMPLETED /sdcard/EMusic/Josh Woodward/ Breadcrumbs/TheVoices.mp3 content://media/internal/audio/media/4 Any idea on what to change to make media scanning work again in froyo? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] timeout on wakelock causes WakeLock under-locked error
Hi, I have a service that acts a download manager, downloading files in the background. I have aquired a partial wake lock while the downloads are going. When the downloads finish, I manually release the wakelock. Because I am paranoid, I acquired the wakelock also with a timeout. The problem I am seeing is that if I have already manually released my wakelock, when the timeout period expires an error is presented to the user (and adb logcat shows an under-locked wakelock exception). Is there any way to use a timeout (as backup wakelock release in case the app force closes for some reason) without getting this error? Cheers, Jack -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: timeout on wakelock causes WakeLock under-locked error
Ya, I am checking isHeld() before I release it when I do it manually... But, apparently when you set a timeout, whatever part of android releases the wakelock does not check if it is held. That is my problem. If I manually release it before the timeout, when the timeout comes, I get an under-locked exception. On Jul 7, 9:32 am, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 7, 2010 at 12:26 PM, jdeslip jdes...@gmail.com wrote: Is there any way to use a timeout (as backup wakelock release in case the app force closes for some reason) without getting this error? Check isHeld() before release()-ing it. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy _Android Programming Tutorials_ Version 2.8 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] Add Media Files to Library in Froyo
I have develop and app that downloads music files and should add them to the music library. I use the following class to do this: public 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() { Log.e(SCANNER,SCAN CONNECTED); mConnection.scanFile(mPath, mMimeType); } public void onScanCompleted(String path, Uri uri) { Log.e(SCANNER,SCAN COMPLETED +path+ +uri); mConnection.disconnect(); mContext = null; } } Everything works ok with android 2.1 and below. But, in android 2.2, the media files do not get added to my music library. :( I know there were some changes in froyo API for music scanning, but I am unsure why the above no longer works. By the way, everything seems to scan fine - i.e. I get ok log messages - E/SCANNER ( 339): SCAN COMPLETED /sdcard/EMusic/Josh Woodward/ Breadcrumbs/TheVoices.mp3 content://media/internal/audio/media/4 Any idea on what to change to make media scanning work again in froyo? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Add Media Files to Library in Froyo
I tried with the new API: MediaScannerConnection.scanFile(EMD.context,names,types,null); ...and it still does not add the files to the music library. Is media scanning just broken in Android 2.2??? The files are actually added to my library if I restart the phone or unmount/mount the sdcard. But in 2.1 and below, they are added to the music library immediately using the above code. Anyone got any ideas/suggestions? On Jul 7, 4:55 pm, jdeslip jdes...@gmail.com wrote: I have develop and app that downloads music files and should add them to the music library. I use the following class to do this: public 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() { Log.e(SCANNER,SCAN CONNECTED); mConnection.scanFile(mPath, mMimeType); } public void onScanCompleted(String path, Uri uri) { Log.e(SCANNER,SCAN COMPLETED +path+ +uri); mConnection.disconnect(); mContext = null; } } Everything works ok with android 2.1 and below. But, in android 2.2, the media files do not get added to my music library. :( I know there were some changes in froyo API for music scanning, but I am unsure why the above no longer works. By the way, everything seems to scan fine - i.e. I get ok log messages - E/SCANNER ( 339): SCAN COMPLETED /sdcard/EMusic/Josh Woodward/ Breadcrumbs/TheVoices.mp3 content://media/internal/audio/media/4 Any idea on what to change to make media scanning work again in froyo? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: share images with twitter app and buzz app
The image file is on the sdcard and when I choose other applications like facebook and gmail the image is attached fine - it just when the user chooses to share the image with Twitter/Buzz that nothing happens... But, the gallery app is able to successfully share images with Twitter/ Buzz; so, there must be a way! On Jul 4, 2:29 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 3, 2010 at 7:14 PM, jdeslip jdes...@gmail.com wrote: I still have this issue. Does anyone know what I am doing wrong. Other apps (like the gallery) can share images to Twitter/buzz; so, I must be missing something. I have not tried using ACTION_SEND with an attachment. However, I am fairly certain that sharedfilename will need to either be on the SD card or be MODE_WORLD_READABLE. Otherwise, the other application will not be able to use the file. Does that fit what you are doing? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting: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] Re: share images with twitter app and buzz app
OK - I found out that if I got rid of the body extra than it worked. Apparently the twitter app and buzz app don't want both a pic and a body... On Jul 4, 2:29 am, Mark Murphy mmur...@commonsware.com wrote: On Sat, Jul 3, 2010 at 7:14 PM, jdeslip jdes...@gmail.com wrote: I still have this issue. Does anyone know what I am doing wrong. Other apps (like the gallery) can share images to Twitter/buzz; so, I must be missing something. I have not tried using ACTION_SEND with an attachment. However, I am fairly certain that sharedfilename will need to either be on the SD card or be MODE_WORLD_READABLE. Otherwise, the other application will not be able to use the file. Does that fit what you are doing? -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Consulting: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] Re: share images with twitter app and buzz app
I still have this issue. Does anyone know what I am doing wrong. Other apps (like the gallery) can share images to Twitter/buzz; so, I must be missing something. On Jun 16, 2:11 pm, jdeslip jdes...@gmail.com wrote: So, I added the following intent to my app to share images captured. Intent i=new Intent(android.content.Intent.ACTION_SEND); i.setDataAndType(Uri.parse(sharedfilename),image/jpeg); i.putExtra(Intent.EXTRA_SUBJECT, Check out this picture from SquirrelCam); i.putExtra(Intent.EXTRA_TEXT,Taken with SquirrelCam for Android); i.putExtra(Intent.EXTRA_STREAM, Uri.parse(sharedfilename)); startActivity(Intent.createChooser(i, Share Image)); It works as expected when using the intent to launch gmail/picassa/ picsay/messenger but the image does not seem to attach it self when I choose the Buzz of Twitter app from the share menu that pops up. I.e. those two apps launch just with the text and not the image attached. Any idea what I am missing to have this intent launch buzz/twitter with the image attached? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] share images with twitter app and buzz app
So, I added the following intent to my app to share images captured. Intent i=new Intent(android.content.Intent.ACTION_SEND); i.setDataAndType(Uri.parse(sharedfilename),image/jpeg); i.putExtra(Intent.EXTRA_SUBJECT, Check out this picture from SquirrelCam); i.putExtra(Intent.EXTRA_TEXT,Taken with SquirrelCam for Android); i.putExtra(Intent.EXTRA_STREAM, Uri.parse(sharedfilename)); startActivity(Intent.createChooser(i, Share Image)); It works as expected when using the intent to launch gmail/picassa/ picsay/messenger but the image does not seem to attach it self when I choose the Buzz of Twitter app from the share menu that pops up. I.e. those two apps launch just with the text and not the image attached. Any idea what I am missing to have this intent launch buzz/twitter with the image attached? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Associate my app with file format
Thanks, Ya, I figured application/emx* would not match anything; but I was grasping at straws. The server side of things is not in my control. I have to deal with the .emx files being downloaded with empty mimetype - or give up the enterprise entirely. :/ Usining mimetype=applcation/* is the only thing so far that allows me to download these .emx files in the browser and then open them from the downloads screen. Why does the browsers' download screen not recognize the path based associations like the various file managers do? Is there a scheme I am missing for the browser? -Jack On Jun 5, 11:02 pm, Dianne Hackborn hack...@android.com wrote: We generally don't do matching based on extension, but on MIME type. Ideally you want your server to reporting a proper MIME type for your file. Also, the MIME type matches only handles '*' for type and subtype -- that is, application/* or */*. Your 'application/emx*' will not match anything. On Sat, Jun 5, 2010 at 6:41 PM, jdeslip jdes...@gmail.com wrote: I am writing an app that needs to be able to open (be associated in the browser download window for example) with a certain file type. The file type has .emx extension and is in an xml format (the top of the files have ?xml version='1.0' encoding=UTF-8? ). However, I can't for the life of me get my app associated with this filetype. I have tried the following in my Manifest: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:mimeType=application/xml/ data android:mimeType=application/rss+xml/ data android:mimeType=application/emx+xml/ data android:mimeType=application/*xml/ data android:mimeType=text/xml/ data android:mimeType=application/emx/ data android:mimeType=application/emx*/ data android:mimeType=application/xml*/ /intent-filter with no luck. I can get the filetype associated properly with my app if I do the following: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:mimeType=application/*/ /intent-filter but this also associates my app with every file format (which I obviously don't want though I see that snesnoid does this for example). Does anyone know how I can associate my app with this .emx file format alone? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Associate my app with file format
I am writing an app that needs to be able to open (be associated in the browser download window for example) with a certain file type. The file type has .emx extension and is in an xml format (the top of the files have ?xml version='1.0' encoding=UTF-8? ). However, I can't for the life of me get my app associated with this filetype. I have tried the following in my Manifest: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:mimeType=application/xml/ data android:mimeType=application/rss+xml/ data android:mimeType=application/emx+xml/ data android:mimeType=application/*xml/ data android:mimeType=text/xml/ data android:mimeType=application/emx/ data android:mimeType=application/emx*/ data android:mimeType=application/xml*/ /intent-filter with no luck. I can get the filetype associated properly with my app if I do the following: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:mimeType=application/*/ /intent-filter but this also associates my app with every file format (which I obviously don't want though I see that snesnoid does this for example). Does anyone know how I can associate my app with this .emx file format alone? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Associate my app with file format
Further info, I tried adding the following to my manifest: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE/ data android:scheme=http android:host=* android:pathPattern=.*\\.emx.*/ data android:scheme=https android:host=* android:pathPattern=.*\\.emx/ data android:scheme=content android:host=* android:pathPattern=.*\\.emx/ data android:scheme=file android:host=* android:pathPattern=.*\\.emx/ /intent-filter Now, in astro, OI-Filemanager my app is associated with .emx files. But, in the Browser downloads screen, my app is still not associated with .emx files. So, my new question is this, what do I need to do to get .emx files associated with my app in the Browser downloads screen. -Jack On Jun 5, 6:41 pm, jdeslip jdes...@gmail.com wrote: I am writing an app that needs to be able to open (be associated in the browser download window for example) with a certain file type. The file type has .emx extension and is in an xml format (the top of the files have ?xml version='1.0' encoding=UTF-8? ). However, I can't for the life of me get my app associated with this filetype. I have tried the following in my Manifest: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:mimeType=application/xml/ data android:mimeType=application/rss+xml/ data android:mimeType=application/emx+xml/ data android:mimeType=application/*xml/ data android:mimeType=text/xml/ data android:mimeType=application/emx/ data android:mimeType=application/emx*/ data android:mimeType=application/xml*/ /intent-filter with no luck. I can get the filetype associated properly with my app if I do the following: intent-filter action android:name=android.intent.action.VIEW/ category android:name=android.intent.category.DEFAULT / category android:name=android.intent.category.BROWSABLE / data android:mimeType=application/*/ /intent-filter but this also associates my app with every file format (which I obviously don't want though I see that snesnoid does this for example). Does anyone know how I can associate my app with this .emx file format alone? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] ACTION_VIEW sefaults is no application installed for mimetype
Hi All, I have an app that downloads a pdf from a server and tries to open it with an itent: Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File file = new File(filepath+filename); intent.setDataAndType(Uri.fromFile(file), application/pdf); try { startActivity(intent); } catch (ActivityNotFoundException e) { final Exception ef = e; txt2.post(new Runnable() { public void run() { txt2.setText( +ef); } }); } Everything works great if any applications are installed on the device that will open a pdf. But, if no apps are installed, this part of the code just segfaults (my catching of the exception apparently does not work). Here is the logcat output I/ActivityManager( 61): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///sdcard/arXiv/tmp.pdf typ=application/pdf } W/dalvikvm( 322): threadid=7: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 322): FATAL EXCEPTION: Thread-9 E/AndroidRuntime( 322): java.lang.NullPointerException E/AndroidRuntime( 322):at com.commonsware.android.arXiv.singleitemwindow $1.run(singleitemwindow.java:243) W/ActivityManager( 61): Force finishing activity com.commonsware.android.arXiv/.singleitemwindow So, my question is can I somehow determine if any app is available for application/pdf mimetype ahead of time. Or, can I prevent the code from dying here and tell the user to install a pdf reader app? -Jack -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: ACTION_VIEW sefaults is no application installed for mimetype
Ooops. I figured this out. It was actually catching the problem fine but crashing during my txt2 writing. -Jack On Jun 2, 1:01 pm, jdeslip jdes...@gmail.com wrote: Hi All, I have an app that downloads a pdf from a server and tries to open it with an itent: Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File file = new File(filepath+filename); intent.setDataAndType(Uri.fromFile(file), application/pdf); try { startActivity(intent);} catch (ActivityNotFoundException e) { final Exception ef = e; txt2.post(new Runnable() { public void run() { txt2.setText( +ef); } }); } Everything works great if any applications are installed on the device that will open a pdf. But, if no apps are installed, this part of the code just segfaults (my catching of the exception apparently does not work). Here is the logcat output I/ActivityManager( 61): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///sdcard/arXiv/tmp.pdf typ=application/pdf } W/dalvikvm( 322): threadid=7: thread exiting with uncaught exception (group=0x4001d800) E/AndroidRuntime( 322): FATAL EXCEPTION: Thread-9 E/AndroidRuntime( 322): java.lang.NullPointerException E/AndroidRuntime( 322): at com.commonsware.android.arXiv.singleitemwindow $1.run(singleitemwindow.java:243) W/ActivityManager( 61): Force finishing activity com.commonsware.android.arXiv/.singleitemwindow So, my question is can I somehow determine if any app is available for application/pdf mimetype ahead of time. Or, can I prevent the code from dying here and tell the user to install a pdf reader app? -Jack -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: WiFi data transfer stalls as soon as screen becomes blank
Hi, I have the exact same problem on a download manager app I am trying to write. My service aquires PARTIAL_WAKE_LOCK, but when the screen is blank wifi downloads still seem to come to a stand-still (on Nexus One). If I instead acquire a FULL_WAKE_LOCK (or SCREEN_DIM) all is fine. Obviously, these don't make any sense for a download- manager... Also, everything is fine with 3G downloads (they keep going in the background whether I have any wakelock or not). Did you ever figure this problem out? -Jack On Apr 15, 10:49 am, Thilo-Alexander Ginkel th...@ginkel.com wrote: Hello again, On Apr 11, 3:12 pm, Thilo-Alexander Ginkel th...@ginkel.com wrote: I am currently trying to figure out how to fix an annoying bug in Sipdroid [1], which seems to be triggered by a power management optimization in Android 2.1: While a SIP (VoIP) call is in progress via WiFi, the data transfer becomes unreliable (and basically stalls) as soon as the display goes blank after the display timeout or proximity sensor has been triggered. As soon as the display comes back (by hitting the power button or releasing the proximity sensor) the data transfer reverts back to normal. Currently, the only possible workaround seems to be to acquire a PowerManager.SCREEN_DIM_WAKE_LOCK for the duration of the call, which reliably prevents the issue from surfacing. Still, I think it would be beneficial to come up with a solution that allows the screen to become blank (if only for reducing battery consumption). In the meantime I thought about this issue and came to the conclusion that it may not be WiFi throttling, which is causing the trouble, but rather CPU scaling. In that case, my question would be what other apps, such as media players are doing to avoid being throttled by CPU scaling while the screen is turned off? Thanks, Thilo -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: MediaPlayer skips even though PARTIAL_WAKE_LOCK is set
@Thilo-Alexander, I am having the exact same problem as you! I am developing a download manager for a particular site and have a service that aquired PARTIAL_WAKE_LOCK, but when the screen blanks (I press power) the download pauses. Downloads make no progress at all when the screen is off. If I do a FULL_WAKE_LOCK, I get the expected behavior (screen/ CPU are on full blast). Did you ever find a solution? -Jack On Apr 25, 1:23 pm, Thilo-Alexander Ginkel th...@ginkel.com wrote: On Apr 25, 9:59 pm, Thilo-Alexander Ginkel th...@ginkel.com wrote: The weird thing is, the problem goes away if I use SCREEN_DIM_WAKE_LOCK instead. But I really don't want to drain my users' batteries needlessly. That looks somewhat similar to the problem I described at: http://groups.google.com/group/android-developers/browse_thread/threa... Seems as if HTC are applying some very aggressive power saving when the screen is turned off. Unfortunately, I do not yet have a solution (there must be one [most likely undocumented] as the native phone application is not affected). After reading the PowerManager source code, I figured out that there seems to be an undocumented wake lock for the CPU, which is used along with a SCREEN_DIM_WAKE_LOCK, but not with a PARTIAL_WAKE_LOCK: -- 8 -- private static final int WAKE_BIT_CPU_STRONG = 1; private static final int WAKE_BIT_CPU_WEAK = 2; [...] /** * Wake lock that ensures that the CPU is running. The screen might * not be on. */ public static final int PARTIAL_WAKE_LOCK = WAKE_BIT_CPU_STRONG; [...] /** * Wake lock that ensures that the screen is on (but may be dimmed); * the keyboard backlight will be allowed to go off. */ public static final int SCREEN_DIM_WAKE_LOCK = WAKE_BIT_CPU_WEAK | WAKE_BIT_SCREEN_DIM; -- 8 -- Can you try what happens if you acquire the wake lock with the WAKE_BIT_CPU_WEAK set? I'd try it myself, but am a little short on time right now. Regards, Thilo -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 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