[android-developers] Streaming of Wav Files using Native Player
Hi, Our application needs streaming of audio files.I have done with streaming of mp3 files by calling the native player and passing the url to it. Whereas the default player is not able to play the wav format files from remote server. The following code worked for mp3 files. Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse("http://myserverurl/voice.mp3";); String type = "audio/mp3"; intent.setDataAndType(data, type); startActivity(intent) I changed the mime type for wav format but it didn't worked Intent intent = new Intent(android.content.Intent.ACTION_VIEW); Uri data = Uri.parse("http://myserverurl/voice.wav";); String type = "audio/wav"; // tried String type = "audio/x-wav"; intent.setDataAndType(data, type); startActivity(intent) Anyone suggestions ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 To unsubscribe, reply using "remove me" as the subject.
[android-developers] Re: Getting the amount of Audio data buffered in the device
Hi KK, Can you please tell me how to decode mp3 to wav ? working with libmad but not able to fix it. Thanks and Regards, Kamal On Apr 5, 3:00 pm, KK wrote: > I am trying to write a streaming application. I have my own decoder > and I am playing PCM audio using AudioTrack. At any point in time I > want to know how much data is buffered with the device. I want to use > this so that if the data with the device go below a level, I want to > go into a buffering mode where I will buffer 2-3 seconds of data > before continuing playback again. Can someone please tell me how to do > this? > > Thanks in advance > KK -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 To unsubscribe, reply using "remove me" as the subject.
[android-developers] Re: Getting the amount of Audio data buffered in the device
Hi Kavitha, Did you got any decoder information ?I am also looking similar one.Can you please share with me. Kamal On Apr 5, 3:06 pm, kavitha wrote: > could you please tell how to decode audio? > > On Mon, Apr 5, 2010 at 3:30 PM, KK wrote: > > > > > I am trying to write a streaming application. I have my own decoder > > and I am playing PCM audio using AudioTrack. At any point in time I > > want to know how much data is buffered with the device. I want to use > > this so that if the data with the device go below a level, I want to > > go into a buffering mode where I will buffer 2-3 seconds of data > > before continuing playback again. Can someone please tell me how to do > > this? > > > Thanks in advance > > KK > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com> > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > > To unsubscribe, reply using "remove me" as the subject. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 of Wav Files using Native Player
Hi Any one has any idea ? Kamal On Apr 5, 12:27 pm, Kamal Hasan wrote: > Hi, > Our application needs streaming of audio files.I have done with > streaming of mp3 files by calling the native player and passing the > url to it. Whereas the default player is not able to play the wav > format files from remote server. > > The following code worked for mp3 files. > > Intent intent = new > Intent(android.content.Intent.ACTION_VIEW); > Uri data = > Uri.parse("http://myserverurl/voice.mp3";); > String type = "audio/mp3"; > intent.setDataAndType(data, type); > startActivity(intent) > > I changed the mime type for wav format but it didn't worked > > Intent intent = new > Intent(android.content.Intent.ACTION_VIEW); > Uri data = > Uri.parse("http://myserverurl/voice.wav";); > String type = "audio/wav"; // tried String > type = "audio/x-wav"; > intent.setDataAndType(data, type); > startActivity(intent) > > Anyone suggestions ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 To unsubscribe, reply using "remove me" as the subject.
[android-developers] Re: Why my application get "Not granting permission warning" when i install it by adb and AppsInstaller
Is there any way to abort Incoming Call ? one more question, Can I abort Out going sms ? Kamal On Mar 23, 10:36 pm, Dianne Hackborn wrote: > On Mon, Mar 23, 2009 at 6:18 AM, Disconnect wrote: > > On a related note, since I am without my build machine at the moment (sigh, > > apple, boo) do you know off the top of your head if master allows rebinding > > the 'talk' and general phone/contact UI to a different app? (There is a 3rd > > party phonebook app in the market - free no less - that rocks, but the > > released code always falls back to the system dialer/phonebook. Which I'm > > sure is an oversight/bug rather than design, since "phonebook" is one of the > > examples on that page :) ..) > > Sorry, I'm not sure what you are referring to -- an app can implement the > DIAL and CALL intents to be launched when things like the call button is > pressed. I'm not aware of other ways to get into the Dialtacts app, but I > don't work on that code so wouldn't really know. > > -- > 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. 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: conversion to dalvik format failed with error 1
Hi My project was running perfectly and when I cleaned the project then It started to give the following error. [2009-05-08 12:47:24 - MobilChek] no classfiles specified [2009-05-08 12:47:24 - MobilChek] Conversion to Dalvik format failed with error 1 Pls help me in resolving this issue. Kamal On May 4, 2:53 am, "Justin (Google Employee)" wrote: > Did you update your plugin? If so, did you create either a 1.1 AVD or > a 1.5 w/Google Maps AVD? > > Cheers, > Justin > Android Team @ Google > > On May 2, 10:59 am, Berlin Brown wrote: > > > On May 2,1:05 pm, CnmJbm wrote: > > > > ok, it seems i fixed it on my environment. > > > > just delete the R.java (by refreshing the project) and rebuild the > > > project. > > > > On May 2, 9:57 am, CnmJbm wrote: > > > > > i got the sameerror, TOO!!! > > > > > May Day > > > > > On Apr 28, 3:57 pm, "chris.cap...@gmail.com" > > > > wrote: > > > > > > Hi, > > > > > > I just updated to SDK 1.5 and all of my projects are failing to build > > > > > with the followingerror: > > > > > > [2009-04-28 15:53:23 - Utilities] no classfiles specified > > > > > [2009-04-28 15:53:23 - Utilities]ConversiontoDalvikformatfailed > > > > > witherror1 > > > > > > ("Utilities" is the name of this specific project.) > > > > > > Any idea why? I'm on Ubuntu 9.04 x64. Before the update to 1.5 > > > > > everything worked fine. Thanks. > > > > > > Chris > > > I got rid of thaterrorand get thiserror, any ideas. I have a > > similar configuration: > > > [2009-05-02 14:22:39 - HelloWorld]Failedto find an AVD compatible > > with target 'Android 1.1'. Launch aborted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] On Destroy Notification
Hi All, Any one can please tell me, How to get a notification on dead of my application.Android is killing my app after every 40 mins. Is there any way to restart the App programatically again ? Thanks and Regards Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Differentia bussiness contacts and personnel contacts
Hi , Can anyone tell me how to differentiate Business Contacts and Personnel Contacts ? I am able to access contacts(using Content_URI) but , not able to get all details of a contact. I want to join the cursors to get one record per person / contact.Please help me joining the cursors. Thanks and Regards Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Media Player not working on HTTPS as Data source
Hi, I am able to play mp3 files from a HTTP server.I have given the link as Datasource and it is working fine.When I replaced the link with HTTPS then media player is not working.Please help to resolve this issue. Thanks in advance. Cheers, Kamal -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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: Media Player not working on HTTPS as Data source
Hi , Whether Android Media Player supports HTTPS protocol ? Kamal On Feb 15, 7:34 pm, Kamal Hasan wrote: > Hi, > > I am able to play mp3 files from a HTTP server.I have given the link > as Datasource and it is working fine.When I > > replaced the link with HTTPS then media player is not working.Please > help to resolve this issue. > > Thanks in advance. > > Cheers, > Kamal -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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: PVMFFailure when using MediaPlayer for radio streams
Hi, Any one has tried with HTTPS on media player I am getting "Command PLAYER_SET_DATA_SOURCE completed with an error or info PVMFErrNotSupported" Error. I am able to play the file on http but failed to play on HTTPS. Can you help me in this regard. Kamal On Feb 11, 10:42 pm, Steve wrote: > I can make this work on 1.6 with this > linkhttp://www.colorado.edu/AmStudies/lewis/Design/blue.mp3 > > What is the url you are trying to connect to? > > On Jan 29, 6:08 am, David wrote: > > > > > ps-I am using version 1.5 on a HTC phone > > > On Jan 14, 9:48 pm, Tanmay wrote: > > > > I tried doing this in 1.6 but still gave me the Prepare Failed 0x1 > > > error along with thePVMFFailurein the log. > > > Has there been any solution to this one developed yet? > > > > On Dec 14 2009, 10:13 pm, YaushiIizuka wrote: > > > > > Hi. > > > > > String url = "http://your.url";; > > > > MediaPlayer mp = new MediaPlayer(); > > > > mp.setDataSource(url); > > > > mp.setAudioStreamType(AudioManager.STREAM_MUSIC); > > > > mp.prepare(); > > > > mp.start(); > > > > > On 10月23日, 午後3:28, dede wrote: > > > > > > Hi, > > > > > In 1.6,I also try to play stream through setDataSource(http:// > > > > > xxx/.mp3), > > > > > but also it return IOException: prepare failed, status=0x1. > > > > > If set the url into windowsmediaplayer, it can play correctly, I > > > > > wanna know your problem whether be resolved? > > > > > If yes, can u tell me the solution,thanks very much. > > > > > > On 10月7日, 上午5时41分, iwhoyt wrote: > > > > > > > In 1.5 I was able to stream an mp3 over http by passing the url to > > > > > > setDataSource(). However I started gettingPVMFFailures in 1.6. For > > > > > > me the issue was the Content-Type http header. If the header was set > > > > > > correctly (Content-Type: audio/mpeg), the stream played. Otherwise > > > > > > if > > > > > > failed during PLAYER_INIT. > > > > > > > On Sep 2, 2:32 am, siliconeagle wrote: > > > > > > > > Also the URl is a http (MP3) stream URL - as opposed tioo other > > > > > > > opost > > > > > > > where RTSP is being tried. It looks like it should just work. Has > > > > > > > anyone else got streaming working via a streaming URL? > > > > > > > > On Sep 1, 1:24 pm, siliconeagle wrote: > > > > > > > > > I am trying to build streaming radio into my app, which works > > > > > > > > fines > > > > > > > > streaming files over the internet, but when i try to use a > > > > > > > > shoutcast > > > > > > > > url in get the error below, which from the soruce code looks > > > > > > > > liek the > > > > > > > > mediaPlayer is looking for the duration in the header. Does > > > > > > > > anyone > > > > > > > > know if shoutcast urls will work withthe defaultmediaplayer? Or > > > > > > > > do i > > > > > > > > have to download chunks into a ping-pong buffer sor something? > > > > > > > > The url > > > > > > > > has no porblems downloading via the browser. > > > > > > > > > the error is:- > > > > > > > > > 09-01 11:53:25.634 E/MediaPlayer(16972): stop called in state 1 > > > > > > > > 09-01 11:53:27.324 D/BatteryWidget(15623): Updating Views > > > > > > > > 09-01 11:53:30.445 E/PlayerDriver( 35): Command PLAYER_INIT > > > > > > > > completed with an error or infoPVMFFailure > > > > > > > > 09-01 11:53:30.445 E/MediaPlayer(16972): error (1, -1) > > > > > > > > 09-01 11:53:30.504 I/NotificationService( 55): enqueueToast > > > > > > > > pkg=net.robmunro.mypod > > > > > > > > callback=android.app.ITransientNotification$Stub > > > > > > > > $pr...@4323b8f8 duration=1000 > > > > > > > > 09-01 11:53:30.514 W/System.err(16972): java.io.IOException: > > > > > > > > Prepare > > > > > > > > failed.: status=0x1 > > > > > > > > 09-01 11:53:30.644 W/System.err(16972): at > > > > > > > > android.media.MediaPlayer.prepare(Native Method) > > > > > > > > 09-01 11:53:30.644 W/System.err(16972): at > > > > > > > > net.robmunro.mypod.util.MediaPlayerWrapper.playMedia > > > > > > > > (MediaPlayerWrapper.java:111) > > > > > > > > > the code i use is:- > > > > > > > > try { > > > > > > > > mPlayer.stop(); > > > > > > > > mPlayer.reset();} catch (Exception e) { > > > > > > > > > e.printStackTrace();} > > > > > > > > > this.source=source; > > > > > > > > if (source.equals(Globals.SOURCE_LOCAL)) { > > > > > > > > mPlayer.setDataSource(f.path); > > > > > > > > buffered = 0;} else if > > > > > > > > (source.equals(Globals.SOURCE_STREAM)) { > > > > > > > > > mPlayer.setDataSource(f.remoteUrl); > > > > > > > > buffered = 100;} > > > > > > > > > mPlayer.prepare(); > > > > > > > > mPlayer.start();- 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
[android-developers] Dispatch Key Event
Hi, I want to inject a Global Key Event.In previous version of SDK it was supported by injectKeyEvent method which is removed later. Please help me to inject a new KeyEvent to the device. Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Intercept Outgoing Calls
Hi, Any body know, how to intercept out going call. I just want to block the out going calls using my code. I have tried to dispatch key event, which is not working.Is there any way to inject Key events globally ? Thanks a lot Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Delete SMS from Inbox
Hi, Anybody knows how to delete sms from inbox. I have tried using the following format but its giving Illegal argument Exception : Unknown URL getContentResolver().delete(Uri.parse("content://sms/ inbox"),null,null); Anybody knows the format to delete sms ? Thanks a lot Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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: Delete SMS from Inbox
Hi All, I am answering myself. we can delete sms using the following code. ContentResolver cr = getContentResolver(); Uri url = Uri.parse("content://sms/"); // get the "_id" of the message which you want to delete. int numRecs = cr.delete(url,"_id="+id, null); //numRecs will give you number of records deleted. Kamal On Jan 15, 2:55 pm, Kamal Hasan wrote: > Hi, > > Anybody knows how todeletesmsfrom inbox. > I have tried using the following format but its giving Illegal > argument Exception : Unknown URL > > getContentResolver().delete(Uri.parse("content://sms/ > inbox"),null,null); > > Anybody knows the format todeletesms? > > Thanks a lot > > Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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: unable to delete sms from inbox
Hi All, we can delete sms using the following code. ContentResolver cr = getContentResolver(); Uri url = Uri.parse("content://sms/"); // get the "_id" of the message which you want to delete. int numRecs = cr.delete(url,"_id="+id, null); //numRecs will give you number of records deleted. Kamal On Jan 23, 3:46 pm, ipeg.stud...@gmail.com wrote: > Hi, > > I am trying todeletesmsfrom inbox > > getContentResolver().delete(Uri.parse("content://sms/conversations/ > 9"), null, null); > > the above statement does not work. gives error. > > 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 -~--~~~~--~~--~--~---
[android-developers] Re: Help!!!! How do I delete sms from inbox?
Hi All, I am answering myself. we can delete sms using the following code. ContentResolver cr = getContentResolver(); Uri url = Uri.parse("content://sms/"); // get the "_id" of the message which you want to delete. int numRecs = cr.delete(url,"_id="+id, null); //numRecs will give you number of records deleted. Kamal On Jan 23, 3:31 pm, ipeg.stud...@gmail.com wrote: > I need to know the code for deleting anSMSfrom the inbox. > > Please help! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 hang up outgoing call?
You can abort a call using BroadcastReceiver in your application. Kamal On Feb 3, 1:31 am, Tilekus wrote: > Hi everyone, > > We are new to Android and creating an application where one of the > things we need is to control the outgoing call, > at least to be able to stop it from our application. > > For now we tried using Intent.ACTION_CALL to use existing activity: > > Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse > ("tel:" + phoneNumber)); > startActivity(callIntent); > > But we can't figure out whether it's possible to stop launched by this > default Call activity. Is it possible? If yes, how? > > If not, what should we use to write our own Call activity to make a > very simple call? > We would want this activity only to be used by our application, not > for all outgoing calls. > > Million thanks in advance, > > Tilek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Abort Http URL
Hi Anyone knows how to block or abort a http url request in android ? Thanks and Regards Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Radio Off
Hi, Programatically how to switch off Radio, bluetooth and wifi in android ? Can I enable airplane mode ? Kamal --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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] Out of Memory for Large Images
I want to display an image which is around 4 MB,It is giving Out of Memory while loading the image.It is working fine for small images. Is there any alternative method using which I can display large size images. FileInputStream fin = new FileInputStream(new File("sdcard/DSC00712.jpg")); BufferedInputStream bis = new BufferedInputStream(fin); byte[] data = new byte[bis.available()]; bis.read(data, 0, data.length); Bitmap bitmap = BitmapFactory.decodeByteArray(data,0,data.length); if(bitmap!=null) img.setImageBitmap(bitmap); else Log.e("Bitmap "," Not Created"); Please suggest me a method to display large images or its not possible to display large images !! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 To unsubscribe, reply using "remove me" as the subject.
[android-developers] Re: Out of Memory for Large Images
Even after passing the inputstream to the decode function, it is giving OOM error. Is there any alternative solution to display large images ? Kamal On Apr 14, 12:53 pm, Mario Zechner wrote: > Try not to load the image into a byte array before passing it to the > BitmapFactory but rather pass the InputStream directly to the > BitmapFactory. There is a limit for the size of an image, however, 4mb > should work. > > On 14 Apr., 09:25, Kamal Hasan wrote: > > > > > I want to display an image which is around 4 MB,It is giving > > Out of Memory while loading the image.It is working fine for small > > images. Is there any alternative method using which I can display > > large size images. > > > FileInputStream fin = new FileInputStream(new > > File("sdcard/DSC00712.jpg")); > > BufferedInputStream bis = new > > BufferedInputStream(fin); > > byte[] data = new byte[bis.available()]; > > bis.read(data, 0, data.length); > > Bitmap bitmap = > > BitmapFactory.decodeByteArray(data,0,data.length); > > if(bitmap!=null) > > img.setImageBitmap(bitmap); > > else > > Log.e("Bitmap "," Not Created"); > > > Please suggest me a method to display large images or its not possible > > to display large images !! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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 To unsubscribe, reply using "remove me" as the subject.
[android-developers] Re: onLowMemory not getting called
Hi, When I am trying to load even a image of 4 MB the application is giving OOM error.Is there any alternative way to create bitmap from large images? What is the maximum heap for an application? FileInputStream fin = new FileInputStream(new File("sdcard/DSC00712.jpg")); if(fin!=null){ Bitmap bitmap = BitmapFactory.decodeStream(fin); if(bitmap!=null) img.setImageBitmap(bitmap); else Log.e("Bitmap "," Not Created"); Thanks and Regards Kamal On Apr 13, 11:47 pm, Romain Guy wrote: > onLowMemory() is called when the entire system is runningoutofmemory, not > when your process is runningoutofmemory. Each app is > limited to a fixed amount of RAM (24 MB on a Nexus One for instance). > If you use up these 24 MB but the system still has more RAM available, > you will get an OutOfMemoryError but not onLowMemory(). > > > > > > On Tue, Apr 6, 2010 at 12:27 AM, Atul Moglewar wrote: > > Hi, > > > I'm working on an application which allocates lot ofmemoryand hence > > I'm bound to get OutOfMemory. I want a way to get notified when system > > is running short ofmemoryso that I can stop processing further, > > notify user and release as muchmemoryas possible. > > > According to official Android documentation there is a callback > > onLowMemory from the system. I have a class which extends > > android.app.Application and I have overridden onLowMemory() method. > > This class has entry in the in the application tag of AndroidManifest. > > However it never gets called in my case. Do I need to register for > > this event using AndroidManifest or any other means? > > > Thanks, > > Atul > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to 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 > > > To unsubscribe, reply using "remove me" as the subject. > > -- > 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: How to detect orientation change in home screen widget?
Hi , Did you get idea about the orientation change in widgets ? Kamal On Mar 16, 2:32 am, kknight wrote: > I am writing a home screenwidgetand want to update (modify) the home > screenwidgetwhen the deviceorientationchanges from portrait to > landscape or the other way. How can I make it? > > Currently, I tried to register to CONFIGURATION_CHANGED action like > the code below, but the Android didn't allow me to do that by saying > "IntentReceiver components are not allowed to register to receive > intents". > The reason that I register to CONFIGURATION_CHANGED is that, the > Android spec said about ACTION_CONFIGURATION_CHANGED: "You can not > receive this through components declared in manifests, only by > explicitly registering for it with Context.registerReceiver(). " > > Can someone help me? Thanks. > > public class MyWidget extends AppWidgetProvider { > > @Override > public void onEnabled(Context context) { > super.onEnabled(context); > this.registerReceiver(this, new > IntentFilter(Intent.ACTION_CONFIGURATION_CHANGED)); > } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to 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