[android-developers] Re: Fwd: Send DTMF
Try something like this: ToneGenerator toneGenerator = new ToneGenerator (AudioManager.STREAM_VOICE_CALL, ToneGenerator.MAX_VOLUME1); toneGenerator.startTone(ToneGenerator.TONE_DTMF_1); On Nov 20, 10:53 pm, j [EMAIL PROTECTED] wrote: Yes Rimma's method works if the program wishes to playDTMFtones when the call connects. It also works if you replaced ; with ,. My further question is: How can an Android program play outgoingDTMF tones in the middle of a phone conversation? Is that possible? On Nov 9, 11:56 pm, Rimma Sukhovsky [EMAIL PROTECTED] wrote: Intent mIntent = new Intent(Intent.ACTION_CALL, Uri.parse(tel: + phoneNumber + ; + dtmfSequence)); On Thu, Nov 6, 2008 at 12:09 PM, [EMAIL PROTECTED] [EMAIL PROTECTED]wrote: Hi, How do you do this ? (adding theDTMFsequence to the dialed number) Thanks. On Oct 23, 4:13 pm, legerb [EMAIL PROTECTED] wrote: I'm adding theDTMFsequence to the dialed number. This seems to work, but when the call is established I'm getting a confirmation dialog asking Send the following tones?. Is it possible to prevent this dialog from being shown? May be some additional permissions? Though I didn't find any relevant... Or is there a way to detect the dialog on screen in order to simulate a key stroke? --~--~-~--~~~---~--~~ 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] Checking API: checkapi-last Error when compiling android source code after repo sync in 11/23/2008 Beijing Time
when i try to repo sync and compile the android source code. A error is reported out. Would you like to let me know how to fix it? Thank you very much. Steps to reproduce the problem: 1. repo sync 2. make The error log is as below. [EMAIL PROTECTED]:/home/thomast/mydroid# make build/core/product_config.mk:229: WARNING: adding test OTA key build/core/main.mk:177: implicitly installing apns-conf_sdk.xml Checking API: checkapi-last (unknown): error 17: Field android.media.AudioManager.ROUTE_ALL has changed value from 15 to -1 ** You have tried to change the API from what has been previously released in an SDK. Please fix the errors listed above. ** make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38 [EMAIL PROTECTED]:/home/thomast/mydroid# [EMAIL PROTECTED]:/home/thomast/mydroid# --~--~-~--~~~---~--~~ 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: Checking API: checkapi-last Error when compiling android source code after repo sync in 11/23/2008 Beijing Time
Either you changed a public API on your copy of the tree, or we broke the build :) On Sun, Nov 23, 2008 at 1:19 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: when i try to repo sync and compile the android source code. A error is reported out. Would you like to let me know how to fix it? Thank you very much. Steps to reproduce the problem: 1. repo sync 2. make The error log is as below. [EMAIL PROTECTED]:/home/thomast/mydroid# make build/core/product_config.mk:229: WARNING: adding test OTA key build/core/main.mk:177: implicitly installing apns-conf_sdk.xml Checking API: checkapi-last (unknown): error 17: Field android.media.AudioManager.ROUTE_ALL has changed value from 15 to -1 ** You have tried to change the API from what has been previously released in an SDK. Please fix the errors listed above. ** make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38 [EMAIL PROTECTED]:/home/thomast/mydroid# [EMAIL PROTECTED]:/home/thomast/mydroid# -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Checking API: checkapi-last Error when compiling android source code after repo sync in 11/23/2008 Beijing Time
This should be fixed now. -Jeff On Sun, Nov 23, 2008 at 1:34 AM, Romain Guy [EMAIL PROTECTED] wrote: Either you changed a public API on your copy of the tree, or we broke the build :) On Sun, Nov 23, 2008 at 1:19 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: when i try to repo sync and compile the android source code. A error is reported out. Would you like to let me know how to fix it? Thank you very much. Steps to reproduce the problem: 1. repo sync 2. make The error log is as below. [EMAIL PROTECTED]:/home/thomast/mydroid# make build/core/product_config.mk:229: WARNING: adding test OTA key build/core/main.mk:177: implicitly installing apns-conf_sdk.xml Checking API: checkapi-last (unknown): error 17: Field android.media.AudioManager.ROUTE_ALL has changed value from 15 to -1 ** You have tried to change the API from what has been previously released in an SDK. Please fix the errors listed above. ** make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38 [EMAIL PROTECTED]:/home/thomast/mydroid# [EMAIL PROTECTED]:/home/thomast/mydroid# -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How do i detect the click of home button?
Applications cannot see when the user hits the home key, so that the users always have a way to get to a known state. -Jeff On Sat, Nov 22, 2008 at 11:22 PM, for android [EMAIL PROTECTED] wrote: I want to know how do i detect the click of home button.. --~--~-~--~~~---~--~~ 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: Checking API: checkapi-last Error when compiling android source code after repo sync in 11/23/2008 Beijing Time
Fyi, discussion on the android source code should be in android-platform or another of the open source groups. On Sun, Nov 23, 2008 at 1:19 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: when i try to repo sync and compile the android source code. A error is reported out. Would you like to let me know how to fix it? Thank you very much. Steps to reproduce the problem: 1. repo sync 2. make The error log is as below. [EMAIL PROTECTED]:/home/thomast/mydroid# make build/core/product_config.mk:229: WARNING: adding test OTA key build/core/main.mk:177: implicitly installing apns-conf_sdk.xml Checking API: checkapi-last (unknown): error 17: Field android.media.AudioManager.ROUTE_ALL has changed value from 15 to -1 ** You have tried to change the API from what has been previously released in an SDK. Please fix the errors listed above. ** make: *** [out/target/common/obj/PACKAGING/checkapi-last-timestamp] Error 38 [EMAIL PROTECTED]:/home/thomast/mydroid# [EMAIL PROTECTED]:/home/thomast/mydroid# -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Marketplace html error - cannot administrate my downloads or create new applications. Will someone in google please read !
Is there nobody here who can help? Is there anybody here who can suggest who I ask ? On Nov 21, 2:22 pm, Richard Green [EMAIL PROTECTED] wrote: Hi there. There is an error in the javascript being generated on my marketplace page that effectively renders the page useless for me. I can no longer view the programs that I have uploaded, nor can I upload any others. The bug is in the code that generates the js files - Error: invalid XML tag syntax Source File:http://market.android.com/publish/gwt/C1EC4AF9F1B1A6AEDEDB919B4E67D00... Line: 207, Column: 39 Source Code: function fT(a){if(a=30){return 1lt;a}else{return fT(30)*fT(a-30)}} please can someone look at this and figure out a way to resolve this. Do I need to re-register and spend another 25 USD on another account ?? --~--~-~--~~~---~--~~ 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: HttpClient and POST requests
http://hc.apache.org/httpcomponents-client/examples.html On Nov 22, 3:37 pm, fala70 [EMAIL PROTECTED] wrote: Hi, I've a problem to translate follow code to org.apache.http.*; OutputStream pos = new OutputStream(); pos.writeShort(Const.INVOCATION_CODE); pos.writeInt(requestId); pos.writeString(nickname); pos.writeString(password); conn = (HttpConnection) Connector.open(url, Connector.READ_WRITE); conn.setRequestMethod(HttpConnection.POST); conn.setRequestProperty(Content-Type, application/octet- stream); conn.setRequestProperty(Accept, application/octet-stream); if(sessionCookie == null) { conn.setRequestProperty(version, ???); } else { conn.setRequestProperty(cookie, sessionCookie); } // Getting the output stream may flush the headers os = conn.openDataOutputStream(); os.write(pos.getBytes()); os.close(); start connection I must use : HttpClient conn = new DefaultHttpClient(); HttpPost httppost = new HttpPost(url); but I've difficult to understand what must I use to set the request proprieties (setRequestProperty) and use an OutputStream to send my requests 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: map view problem
Do you have a valid google maps api key? maybe you also should take a look at this: http://zackola.com/blog/2008/10/26/android-mapview-permissions-and-prerequisites/#comment-227 (hopefully) All prequisites needed for using a map are listed there --~--~-~--~~~---~--~~ 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: TabHost and New Activities
Activities inside TabAcitivity are not true acitivities, and so have some limitations that I noticed. And of course, no documentation about that: * you can't bind to a service, onServiceConnected will never be called. * window features (only available in the TabActivity). * you can't use most of the manifest properties such as the launch flags, and so you can not send intents to an activity inside a tab even in singleTop launch mode, a new activity in full screen will be launched if you try. There must be some other limitations, I don't tested all. What I tried and is working: * Life cycle methods * Menu methods (call super each time when overriding panel menu methods if you want to mix menu items with TabActivity). * startActivity methods. On Nov 23, 2:05 am, Mark Murphy [EMAIL PROTECTED] wrote: g1bb wrote: Gotcha, but how do I define activityGroup as a LocalActivityManager? (I assume that's what it's wanting) If you're not subclassing TabActivity, can you? If the docs are right, that should clear up your problem. Since TabActivity inherits from ActivityGroup, my guess is that the docs are probably correct -- if you inherit from TabActivity, it might just work. If you feel you can't subclass TabActivity for some reason, maybe we can work to fix that problem -- what is holding you back? If you're adamant about not subclassing TabActivity, I'm not sure how you'd make this work, though that doesn't mean it can't be done. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ 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] Why do many data classes not implement Serializable
I was wondering why data classes like Address or GeoPoint do not implement Serializable but only Parcelable. I'd like to store these into a file which does not seem to be possible. I can use Preferences instead, making it a data container, which is surely not what it is intended to be used for. So any reasons why Serializable is not implemented? --~--~-~--~~~---~--~~ 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: Marketplace html error - cannot administrate my downloads or create new applications. Will someone in google please read !
There is a separate market help forum, maybe you'll get better results there: http://www.google.com/support/forum/p/Android+Market On Nov 23, 5:31 am, Richard Green [EMAIL PROTECTED] wrote: Is there nobody here who can help? Is there anybody here who can suggest who I ask ? On Nov 21, 2:22 pm, Richard Green [EMAIL PROTECTED] wrote: Hi there. There is an error in the javascript being generated on my marketplace page that effectively renders the page useless for me. I can no longer view the programs that I have uploaded, nor can I upload any others. The bug is in the code that generates the js files - Error: invalid XML tag syntax Source File:http://market.android.com/publish/gwt/C1EC4AF9F1B1A6AEDEDB919B4E67D00... Line: 207, Column: 39 Source Code: function fT(a){if(a=30){return 1lt;a}else{return fT(30)*fT(a-30)}} please can someone look at this and figure out a way to resolve this. Do I need to re-register and spend another 25 USD on another account ?? --~--~-~--~~~---~--~~ 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 do i detect the click of home button?
It is possible to catch the home button, but as Jeff pointed out, this is not good practice. If you need to do clean-up work before you let the app complete, override onPause(), onStop() and/or onDestroy() On Nov 22, 11:22 pm, for android [EMAIL PROTECTED] wrote: I want to know how do i detect the click of home button.. --~--~-~--~~~---~--~~ 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] Detecting if screen is off
Hi all, Is there a way to detect if the screen is off? I want to be able to show a dialog if the screen is off (using a wakelock) but if the screen is on I want to show a notification (so as not to interfere with what the user is doing). Thanks, Adam --~--~-~--~~~---~--~~ 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] Working of SensorTest
Hi, I've been using the SensorTest with OpenIntents SensorSimulator and cant understand what exactly is it that SensorTest is detecting? It seems to work with Tilts as well as Moves i.e. it shows Left when i do a Left Tilt (using Roll) or Left Swing. Please refer to the question and its reply at the OpenIntents forum. http://groups.google.com/group/openintents/browse_thread/thread/9c38a50e7835a11e It would be great id someone could throw some light on SensorTest. 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] Camera Capture for Android SDK 1r1
Hi, I've created a tutorial for capturing images and storing it on Media.EXTERNAL_CONTENT_URI. http://www.androidph.com/2008/11/camera-capture.html However, I'm having problems with the file_system of the SD Card not updating the contents of the Picture Gallery and vice-versa. Is this a bug or is this normal. Also, the image I capture, is not the blocks that moves around. Its a picture of some comic android. Thanks, ice --~--~-~--~~~---~--~~ 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: Camera Capture for Android SDK 1r1
Is this a bug or is this normal. It is normal. You need MediaScannerConnection() to update the Gallery. Also, the image I capture, is not the blocks that moves around. Its a picture of some comic android. The moving rectangle is for the preview mode, not for still images. Regards On Nov 23, 7:13 pm, android-noob [EMAIL PROTECTED] wrote: Hi, I've created a tutorial for capturing images and storing it on Media.EXTERNAL_CONTENT_URI. http://www.androidph.com/2008/11/camera-capture.html However, I'm having problems with the file_system of the SD Card not updating the contents of the Picture Gallery and vice-versa. Is this a bug or is this normal. Also, the image I capture, is not the blocks that moves around. Its a picture of some comic android. Thanks, ice --~--~-~--~~~---~--~~ 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] Keeping a Service Alive
Hey all, I'm really hoping someone can help me out on this one cause I'm starting to pull my hair out... I've got a service binding to my main activity. The service is running a media player that is playing music in the background. The service also places a notification in the status bar and connects to a local database to receive track name and url info. I'm having two slightly different problems keeping my service alive. 1) When my main activity is destroyed, my service is getting destroyed along with it. The service's onDestroy get's called, playback stops, the notification gets cleared. How can I avoid this? By playing around with the unbindService(ServiceConnection) method in my activity, I've realized that it is what causes the service to be destroyed. So how can I unbind a service without destroying said service? (I'm also having a similar problem with Alarms set with AlarmManager getting destroyed with the destruction of my activity, but unless you recognize this issue right away, I'll save it for another thread.) 2) When my activity doesn't get destroyed right away (i.e. i exit via the home button instead of the back button) and I start doing other things on the device (or emulator) to take up resources, eventually the music will stop playing, but the icon in the status bar will not change, meaning the service's onDestroy is not even getting called (onDestroy clears the notif icon). I think this means that the service was killed to free memory but how can I react to that or prevent it or increase the importance of the service? I've put the imeem application through the same kind of tests and it does not stop playing even when the phone gets low on resources (however I don't know if they're using the built in MediaPlayer, but I'd assume so). So... any ideas? I think #1 is more important but I also think the 2 issues might be connected. Thanks in advance :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: TabHost and New Activities
Hi Mark, I have no problem with that at all. I found this API demo: http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/Tabs3.html Which is exactly what I want, but now I'm having a hard time deriving from that subclass. Is there an example anywhere of how to do this? Thanks again for the help... I'm still pretty new with Java. On Nov 22, 6:05 pm, Mark Murphy [EMAIL PROTECTED] wrote: g1bb wrote: Gotcha, but how do I define activityGroup as a LocalActivityManager? (I assume that's what it's wanting) If you're not subclassing TabActivity, can you? If the docs are right, that should clear up your problem. Since TabActivity inherits from ActivityGroup, my guess is that the docs are probably correct -- if you inherit from TabActivity, it might just work. If you feel you can't subclass TabActivity for some reason, maybe we can work to fix that problem -- what is holding you back? If you're adamant about not subclassing TabActivity, I'm not sure how you'd make this work, though that doesn't mean it can't be done. -- Mark Murphy (a Commons Guy)http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ 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: TabHost and New Activities
g1bb wrote: I have no problem with that at all. I found this API demo: http://code.google.com/android/samples/ApiDemos/src/com/example/android/apis/view/Tabs3.html Which is exactly what I want, but now I'm having a hard time deriving from that subclass. Is there an example anywhere of how to do this? I guess I don't understand the question. That API demo shows how to subclass TabActivity, as do the Tabs1 and Tabs2 demos (same URL, change the number). What specifically are you having problems with? -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: TabHost and New Activities
Hi Mark, My question now is, now that I have the subclass created, how do I create the tabs using _it_, instead of how I was doing it before via the code in my first post? Thanks again for your help. On Nov 23, 12:23 pm, Mark Murphy [EMAIL PROTECTED] wrote: g1bb wrote: I have no problem with that at all. I found this API demo: http://code.google.com/android/samples/ApiDemos/src/com/example/andro... Which is exactly what I want, but now I'm having a hard time deriving from that subclass. Is there an example anywhere of how to do this? I guess I don't understand the question. That API demo shows how to subclass TabActivity, as do the Tabs1 and Tabs2 demos (same URL, change the number). What specifically are you having problems with? -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: Keeping a Service Alive
That is what I've been trying to do, below is the service definition in my AndroidManifest.xml file service android:name=.MDService android:process=:remote intent-filter action android:name=com.episode6.android.carolla.MDService/ action /intent-filter /service And I bind the service in my activity with the following call... bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); And whenever I run unbindService(mConnection); the service still gets destroyed. On Nov 23, 1:52 pm, Mark Murphy [EMAIL PROTECTED] wrote: G wrote: 1) When my main activity is destroyed, my service is getting destroyed along with it. The service's onDestroy get's called, playback stops, the notification gets cleared. How can I avoid this? Have you tried making your service a remote service, one that runs in its own process? http://code.google.com/android/samples/ApiDemos/src/com/example/andro... I haven't tried a remote service yet myself, so I'm not 100% certain it will resolve this problem. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: Keeping a Service Alive
I just realized that the in API Demo for Remote Service Binding, the service is destroyed when the activity is destroyed as well. So it's no help in this case. Can anyone point to a code sample in which a service outlives it's binding in an activity? Do I need to use a BroadcastReceiver or something? I'm very confused :( On Nov 23, 2:46 pm, G [EMAIL PROTECTED] wrote: That is what I've been trying to do, below is the service definition in my AndroidManifest.xml file service android:name=.MDService android:process=:remote intent-filter action android:name=com.episode6.android.carolla.MDService/ action /intent-filter /service And I bind the service in my activity with the following call... bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); And whenever I run unbindService(mConnection); the service still gets destroyed. On Nov 23, 1:52 pm, Mark Murphy [EMAIL PROTECTED] wrote: G wrote: 1) When my main activity is destroyed, my service is getting destroyed along with it. The service's onDestroy get's called, playback stops, the notification gets cleared. How can I avoid this? Have you tried making your service a remote service, one that runs in its own process? http://code.google.com/android/samples/ApiDemos/src/com/example/andro... I haven't tried a remote service yet myself, so I'm not 100% certain it will resolve this problem. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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] native audio interface / AudioRecord.h
David, Thank you very very much for the tips. I've gotten as far as downloading the android source code (onto a clean ubuntu VM I built for the job) and doing an initial make (which generated quite a lot of whining level errors but seemed to complete ok). I'm so-so at Java but a pretty old hand at C/C++ so hopefully I will be able to work through the remaining steps. Can you recommend any other similar interface classes I could examine for general clues? Once I get all this done, will the .so in the .apk be able to go through the marketplace and run on a real G1 or will I only be able to play with in on the emulator? In any case, I will write progress reports to the list and make the code available to all if I succeed. Best Regards, Dorn Hetzel On Fri, Nov 21, 2008 at 8:23 PM, davidsparks davidsparks [EMAIL PROTECTED] wrote: The native interface is called AudioRecord.h. You'll need to download the Android source code, write a JNI interface to AudioRecord, build a .so library that you can include in your APK, write a Java wrapper class for it, and then load the library from your Java wrapper. Hope that helps. Dave On Wed, Nov 19, 2008 at 11:22 AM, Dorn Hetzel [EMAIL PROTECTED] wrote: David, It looks like the MediaRecorder functionality is a non-start for my application since I need to process the audio as it is coming in, not some time later after the recording is complete. Can you provide me some clue as to where to find information on the native interface, since I would rather be able to at least make some progress with the rest of my application while waiting for the next version. Without some alternative to MediaRecorder I will be simply unable to proceed. Thanks! -Dorn On Wed, Nov 19, 2008 at 2:14 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It is the only supported method in SDK 1.0. There is a native interface to audio input, but it will be changing in a future release and I strongly advise against using it. On Nov 19, 8:26 am, dorn [EMAIL PROTECTED] wrote: Is the MediaRecorder the only method available to acquire audio from the microphone, or is there a lower level method available? On Nov 14, 4:59 pm, Dave Sparks [EMAIL PROTECTED] wrote: The MediaRecorder is currently hardcoded for AMR-NB and is intended for MMS messages. You can expect improvements toaudiorecording in a future SDK. On Nov 14, 12:26 pm, ste [EMAIL PROTECTED] wrote: I'm testing out the MediaRecorder'saudiorecording capability, and the quality of theaudiowas less then I was expecting. It was significantly lower then the quality you get while speaking on the phone, and sounded very digitized. I've tested both the 3gpp and MPEG_4 encoding options, and noticed the same quality. Has anyone else noticed this, and is this an issue with the phone's hardware or the MediaRecorder's capabilities? If it's the latter, is the quality of recording something which is planned to be improved? --~--~-~--~~~---~--~~ 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: Keeping a Service Alive
EUREKA! I've figured it out based on some of the documentation I missed. For those who also have trouble... The docs for ContextWrapper.startService(Intent service) includes the following line... Using startService() overrides the default service lifetime that is managed by bindService(Intent, ServiceConnection, int): it requires the service to remain running until stopService(Intent) is called, regardless of whether any clients are connected to it. This is the trick, simply run startService() before you attempt to bind to it! So before, my onCreate contained: bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); Now this has been replaced by: Intent i = new Intent(MDService.class.getName()); startService(i); bindService(i, mConnection, Context.BIND_AUTO_CREATE); After that change, calling unbindService(mConnection) does NOT destroy the service :) So starting a service by binding it from an activity links the service's life-cycle with that of the activity. While starting the Service first, gives it it's own lifecycle, and you can still bind to it right after. (And you still know the service will only actually be started once.) Also, doing this seems to have alleviated my 2nd problem that I described in my 1st post, but this requires a little more testing before i can confirm it. On Nov 23, 3:09 pm, G [EMAIL PROTECTED] wrote: I just realized that the in API Demo for Remote Service Binding, the service is destroyed when the activity is destroyed as well. So it's no help in this case. Can anyone point to a code sample in which a service outlives it's binding in an activity? Do I need to use a BroadcastReceiver or something? I'm very confused :( On Nov 23, 2:46 pm, G [EMAIL PROTECTED] wrote: That is what I've been trying to do, below is the service definition in my AndroidManifest.xml file service android:name=.MDService android:process=:remote intent-filter action android:name=com.episode6.android.carolla.MDService/ action /intent-filter /service And I bind the service in my activity with the following call... bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); And whenever I run unbindService(mConnection); the service still gets destroyed. On Nov 23, 1:52 pm, Mark Murphy [EMAIL PROTECTED] wrote: G wrote: 1) When my main activity is destroyed, my service is getting destroyed along with it. The service's onDestroy get's called, playback stops, the notification gets cleared. How can I avoid this? Have you tried making your service a remote service, one that runs in its own process? http://code.google.com/android/samples/ApiDemos/src/com/example/andro... I haven't tried a remote service yet myself, so I'm not 100% certain it will resolve this problem. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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: TabHost and New Activities
Eureka! I got this to work by taking a look at this sample project: http://www.mail-archive.com/android-developers@googlegroups.com/msg06956.html Set my class that extends TabActivity as the main layout. Thanks again Mark for your help. On Nov 23, 12:45 pm, g1bb [EMAIL PROTECTED] wrote: Hi Mark, My question now is, now that I have the subclass created, how do I create the tabs using _it_, instead of how I was doing it before via the code in my first post? Thanks again for your help. On Nov 23, 12:23 pm, Mark Murphy [EMAIL PROTECTED] wrote: g1bb wrote: I have no problem with that at all. I found this API demo: http://code.google.com/android/samples/ApiDemos/src/com/example/andro... Which is exactly what I want, but now I'm having a hard time deriving from that subclass. Is there an example anywhere of how to do this? I guess I don't understand the question. That API demo shows how to subclass TabActivity, as do the Tabs1 and Tabs2 demos (same URL, change the number). What specifically are you having problems with? -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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] virtual keyboard / input method
hi, i created yavk (yet another virtual keyboard) - http://www.filefactory.com/file/ba0a10/n/VirtualKeyboard_apk , but have no idea how to integrate it with the rest of the system... somehow by Intent/IntentFilter in AndroidManifest.xml ??? any help appreciated thanks pskink --~--~-~--~~~---~--~~ 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] Webkit - prevent reload of page when screen is popped out..?
Hi, I have an app using the WebKit that I'm developing. In my onCreate() method I'm loading my page: browser = (WebView) findViewById(R.id.webkit); browser.getSettings().setJavaScriptEnabled(true); browser.loadUrl(file:///android_asset/mystuff.html); However, this fires off when the keyboard is popped out. What do I need to do in order to have the browser only load on the initial start of the app and not do a complete reload of the page when the orientation is changed? -- David Orriss Jr. My blog: http://www.codethought.com/blog --~--~-~--~~~---~--~~ 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: Webkit - prevent reload of page when screen is popped out..?
I have an app using the WebKit that I'm developing. In my onCreate() method I'm loading my page: browser = (WebView) findViewById(R.id.webkit); browser.getSettings().setJavaScriptEnabled(true); browser.loadUrl(file:///android_asset/mystuff.html); However, this fires off when the keyboard is popped out. What do I need to do in order to have the browser only load on the initial start of the app and not do a complete reload of the page when the orientation is changed? I have a series of blog posts over on AndroidGuys.com on this topic. Search for Rotational Forces. There are several options, and you'll need to determine which one best fits your situation. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ 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: Webkit - prevent reload of page when screen is popped out..?
Thanks Mark.. I'll check it out. Love your book, by the way. Thanks! If you're on the Warescription and have Version 1.4, the first three blog posts are already in the chapter on Rotation Events. The fourth and fifth posts, coming up this week, should appear in Version 1.9. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! --~--~-~--~~~---~--~~ 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: Webkit - prevent reload of page when screen is popped out..?
I'm on the Warescription.. No other way to get that book as far as I'm concerned.. :-) On Sun, Nov 23, 2008 at 1:20 PM, Mark Murphy [EMAIL PROTECTED] wrote: Thanks Mark.. I'll check it out. Love your book, by the way. Thanks! If you're on the Warescription and have Version 1.4, the first three blog posts are already in the chapter on Rotation Events. The fourth and fifth posts, coming up this week, should appear in Version 1.9. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.4 Published! -- David Orriss Jr. My blog: http://www.codethought.com/blog --~--~-~--~~~---~--~~ 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: HttpClient and POST requests
The examples that Guillaume points you to cover most of what you want to do in a POST. What they don't cover is multipart mime messages and setting mime types. With application/octet as the mime type you should be ok with the examples. Otherwise, do have a look at HttpMime. On Nov 23, 12:33 pm, Guillaume Perrot [EMAIL PROTECTED] wrote: http://hc.apache.org/httpcomponents-client/examples.html On Nov 22, 3:37 pm, fala70 [EMAIL PROTECTED] wrote: Hi, I've a problem to translate follow code to org.apache.http.*; OutputStream pos = new OutputStream(); pos.writeShort(Const.INVOCATION_CODE); pos.writeInt(requestId); pos.writeString(nickname); pos.writeString(password); conn = (HttpConnection) Connector.open(url, Connector.READ_WRITE); conn.setRequestMethod(HttpConnection.POST); conn.setRequestProperty(Content-Type, application/octet- stream); conn.setRequestProperty(Accept, application/octet-stream); if(sessionCookie == null) { conn.setRequestProperty(version, ???); } else { conn.setRequestProperty(cookie, sessionCookie); } // Getting the output stream may flush the headers os = conn.openDataOutputStream(); os.write(pos.getBytes()); os.close(); start connection I must use : HttpClient conn = new DefaultHttpClient(); HttpPost httppost = new HttpPost(url); but I've difficult to understand what must I use to set the request proprieties (setRequestProperty) and use an OutputStream to send my requests 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: Why do many data classes not implement Serializable
We generally avoid Serializable because it has a significant amount of overhead. On Sun, Nov 23, 2008 at 5:38 AM, Huebi [EMAIL PROTECTED]wrote: I was wondering why data classes like Address or GeoPoint do not implement Serializable but only Parcelable. I'd like to store these into a file which does not seem to be possible. I can use Preferences instead, making it a data container, which is surely not what it is intended to be used for. So any reasons why Serializable is not implemented? -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: virtual keyboard / input method
Virtual keyboards and other input methods will not be supported in the system until a feature release: http://source.android.com/roadmap On Sun, Nov 23, 2008 at 12:55 PM, skink [EMAIL PROTECTED] wrote: hi, i created yavk (yet another virtual keyboard) - http://www.filefactory.com/file/ba0a10/n/VirtualKeyboard_apk , but have no idea how to integrate it with the rest of the system... somehow by Intent/IntentFilter in AndroidManifest.xml ??? any help appreciated thanks pskink -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: TabHost and New Activities
On Sun, Nov 23, 2008 at 3:45 AM, Guillaume Perrot [EMAIL PROTECTED]wrote: * you can't bind to a service, onServiceConnected will never be called. This is a bug that should be fixed in the future. Not documented because we didn't realize it was broken. :) * window features (only available in the TabActivity). Window features apply to the overall window, so they should be specified in the parent container. * you can't use most of the manifest properties such as the launch flags, and so you can not send intents to an activity inside a tab even in singleTop launch mode, a new activity in full screen will be launched if you try. True, to the system the identity of the group is purely the parent container; all of the other activities are running inside of it, so they are managed by the parent. -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Keeping a Service Alive
Please please please be sure to stop the service when it is no longer needed. For a media player, this generally means only having it in the running state when it is actively playing music; otherwise it should only be needed when there are clients bound to it. If you don't stop your services, then the system has to assume it is needed forever and can't remove your process to allow for other things the user is actually doing. I think this is actually one of our biggest third party application issues, applications that just starts a service and never stops it. This sucks for the user, and just should not be done. In fact there is already code in the system to look for services that have been running a long time without others doing things to them to let them be killed, but it's pretty clear we'll need to be even more brutal about this. :( (Which sucks for things that really do want to run for a long time, like a media player, but it's not clear at all to me what to do about them.) Also, there was a suggestion earlier to try running the service in another process. Multiple processes is again something to be careful of, and to stay away from unless you really need them -- processes are quite heavy-weight entities, so shouldn't be thrown around lightly. On Sun, Nov 23, 2008 at 12:42 PM, G [EMAIL PROTECTED] wrote: EUREKA! I've figured it out based on some of the documentation I missed. For those who also have trouble... The docs for ContextWrapper.startService(Intent service) includes the following line... Using startService() overrides the default service lifetime that is managed by bindService(Intent, ServiceConnection, int): it requires the service to remain running until stopService(Intent) is called, regardless of whether any clients are connected to it. This is the trick, simply run startService() before you attempt to bind to it! So before, my onCreate contained: bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); Now this has been replaced by: Intent i = new Intent(MDService.class.getName()); startService(i); bindService(i, mConnection, Context.BIND_AUTO_CREATE); After that change, calling unbindService(mConnection) does NOT destroy the service :) So starting a service by binding it from an activity links the service's life-cycle with that of the activity. While starting the Service first, gives it it's own lifecycle, and you can still bind to it right after. (And you still know the service will only actually be started once.) Also, doing this seems to have alleviated my 2nd problem that I described in my 1st post, but this requires a little more testing before i can confirm it. On Nov 23, 3:09 pm, G [EMAIL PROTECTED] wrote: I just realized that the in API Demo for Remote Service Binding, the service is destroyed when the activity is destroyed as well. So it's no help in this case. Can anyone point to a code sample in which a service outlives it's binding in an activity? Do I need to use a BroadcastReceiver or something? I'm very confused :( On Nov 23, 2:46 pm, G [EMAIL PROTECTED] wrote: That is what I've been trying to do, below is the service definition in my AndroidManifest.xml file service android:name=.MDService android:process=:remote intent-filter action android:name=com.episode6.android.carolla.MDService/ action /intent-filter /service And I bind the service in my activity with the following call... bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); And whenever I run unbindService(mConnection); the service still gets destroyed. On Nov 23, 1:52 pm, Mark Murphy [EMAIL PROTECTED] wrote: G wrote: 1) When my main activity is destroyed, my service is getting destroyed along with it. The service's onDestroy get's called, playback stops, the notification gets cleared. How can I avoid this? Have you tried making your service a remote service, one that runs in its own process? http://code.google.com/android/samples/ApiDemos/src/com/example/andro... I haven't tried a remote service yet myself, so I'm not 100% certain it will resolve this problem. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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] Re: native audio interface / AudioRecord.h
Could you please move this to android-platform or another of the open source groups? Thanks. On Sun, Nov 23, 2008 at 12:40 PM, Dorn Hetzel [EMAIL PROTECTED] wrote: David, Thank you very very much for the tips. I've gotten as far as downloading the android source code (onto a clean ubuntu VM I built for the job) and doing an initial make (which generated quite a lot of whining level errors but seemed to complete ok). I'm so-so at Java but a pretty old hand at C/C++ so hopefully I will be able to work through the remaining steps. Can you recommend any other similar interface classes I could examine for general clues? Once I get all this done, will the .so in the .apk be able to go through the marketplace and run on a real G1 or will I only be able to play with in on the emulator? In any case, I will write progress reports to the list and make the code available to all if I succeed. Best Regards, Dorn Hetzel On Fri, Nov 21, 2008 at 8:23 PM, davidsparks davidsparks [EMAIL PROTECTED] wrote: The native interface is called AudioRecord.h. You'll need to download the Android source code, write a JNI interface to AudioRecord, build a .so library that you can include in your APK, write a Java wrapper class for it, and then load the library from your Java wrapper. Hope that helps. Dave On Wed, Nov 19, 2008 at 11:22 AM, Dorn Hetzel [EMAIL PROTECTED] wrote: David, It looks like the MediaRecorder functionality is a non-start for my application since I need to process the audio as it is coming in, not some time later after the recording is complete. Can you provide me some clue as to where to find information on the native interface, since I would rather be able to at least make some progress with the rest of my application while waiting for the next version. Without some alternative to MediaRecorder I will be simply unable to proceed. Thanks! -Dorn On Wed, Nov 19, 2008 at 2:14 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: It is the only supported method in SDK 1.0. There is a native interface to audio input, but it will be changing in a future release and I strongly advise against using it. On Nov 19, 8:26 am, dorn [EMAIL PROTECTED] wrote: Is the MediaRecorder the only method available to acquire audio from the microphone, or is there a lower level method available? On Nov 14, 4:59 pm, Dave Sparks [EMAIL PROTECTED] wrote: The MediaRecorder is currently hardcoded for AMR-NB and is intended for MMS messages. You can expect improvements toaudiorecording in a future SDK. On Nov 14, 12:26 pm, ste [EMAIL PROTECTED] wrote: I'm testing out the MediaRecorder'saudiorecording capability, and the quality of theaudiowas less then I was expecting. It was significantly lower then the quality you get while speaking on the phone, and sounded very digitized. I've tested both the 3gpp and MPEG_4 encoding options, and noticed the same quality. Has anyone else noticed this, and is this an issue with the phone's hardware or the MediaRecorder's capabilities? If it's the latter, is the quality of recording something which is planned to be improved? -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Hooks in Activity life cycle
Hi, I'm trying to create an app that needs to do this: a) Hold the PARTIAL_WAKE_LOCK in the started mode so that it continues to work even if the screen goes off (it is a sound-based application) b) May or may not turn off the sound when the home key is pressed. Either way is fine with me. c) Turns off the sound when the back key is pressed. The problem that I am running into is that I can satisfy c) by turning off the sound and releasing the PARTIAL_WAKE_LOCK in either onPause() or onStop(). However, onPause() is also called when the screen shuts off, so I cannot satisfy c). Is there some combination of hooks to write so that I can distinguish between the back key and the screen turning off? Thanks, Akshat --~--~-~--~~~---~--~~ 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 config 18bit BPP LCD
hello all last week,I porting android 1.0 to my board,wich only support 18 bit LCD ,so the android do not display normal,who can help me ? I have make the android project on my ubuntu . who can help me what to modify the soure code for 18bit BPP ?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 shall I need design my application when the device be rotated?
On Nov 8, 1:33 pm, hackbod [EMAIL PROTECTED] wrote: As far as canceling the auto-adjustment I'm not sure what you mean -- if you mean you want to force oneorientation, you can specify in the manifest afixedorientationto use. If you mean you don't want to relayout the screen at all... well that is kind-of weird. :) I'd be interested in knowing exactly what you want accomplish. How exactly can I do a fixed orientation in the manifest? I couldn't figure it out looking at the documentation. --~--~-~--~~~---~--~~ 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] Setting up intents for dynamic buttons
Ok. I have a screen that is essentially a list with a dynamic number of items. Each of these items when clicked needs to switch to the next screen and pass a variable over saying which was clicked. I am trying to use intents to do this, but I am having some trouble. Here is the chunk of code where I am trying to do this: for (int i = 0; i count; i++){ mi = db.getItem(i); //countText.setText(mi.title); items[i] = new TextView(this); items[i].setClickable(true); items[i].setText(mi.title); inteIntent = new Intent(this, MIScreen.class); inteIntent.putExtra(com.android.MIScreen.curIndex, i); items[i].setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startActivity(inteIntent); } }); linearLayout.addView(items[i]); //items[i].setVisibility(1); }; What happens is every button I click just has the last intent settings so no matter which one I click the next screen shows that I clicked the last item. I also tried to do this by using an array of intents. But that gives me an error when I click a button that I have not been able to figure out. So how should I be doing this? Am I taking the wrong approach completely or am I just missing something small? Also, Im trying to use the wsimport tool to set up the Amazon API but am very unfamiliar with the Java tools and can't get wsimport to run on the command line at all. Thanks. -Julian --~--~-~--~~~---~--~~ 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] adb device detection of G1 on Linux
The Android documentation has been updated with some notes on Developing on Android Hardware at http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware. I had some struggles with this as I followed the instructions and verified the device was listed in the lsusb output. Even with lsusb showing the device adb devices failed to detect it. I had been running adb against an emulator before adding /etc/udev/rules.d/50- android.rules. After some trial and error I ran adb kill-server. The next time I ran adb devices it started a new server and the device appeared as it should. So if anyone is having problems with detection of the G1 you might try restarting the adb server after messing with the udev rules. My experiment was with Debian Unstable. --~--~-~--~~~---~--~~ 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 inject a KeyEvent
I'm just wondering about these security issues, injecting events, access to some low level APIs, screen lock, telephony, etc. I've been developing on other mobile operating systems for years and all them allow this kind of technique, it's valuable for some kind of applications, mainly in corporate applications where the company wants the user with no access to phone features like downloads, games, etc, but only a limited set of features. My question is, would you consider adding all this 'privileged' APIs to the security in the manifest, with a 'red' level of alert to the user upon installation, with description of the potential risks, so that user can decide? I know Android core developers said they don't want user to decide, but in my oppinion it is really what should happen. Just my thought. Marcio Alexandroni www.cialogica.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] new android.hardware.camera class
Now since CameraDevice class has been replaced by Camera class...can somebody please help me to write a code to open a camera and click a picture I tried this but does not work Button click = new Button(this); click.bringToFront(); click.setText(Click me); click.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { android.hardware.Camera camera = Camera.open(); camera.setPreviewCallback(new Camera.PreviewCallback() { public void onPreviewFrame(byte[] imageBytes, Camera camera) { System.out.println(In preview); } }); camera.takePicture(null, null, new Camera.PictureCallback() { public void onPictureTaken(byte[] imageBytes,Camera camera) { System.out.println(picture taken); camera.release(); } }); } }); thanks for the 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can I send CJK text via SMS on G1
Hello developpers. I am suffering sending CJK(Chinese, Japanese, Korean) text using SMS. I copypaseted following code in my code. SmsManager sms=SmsManager.getDefault(); sms.sendTextMessage(x, null, 한글test, null, null); It works when I send english text only. But when I send CJK text, it returned empty text. Above code gave me, test only. I have tested two G1 phone, mine and my wife's. I saw aPowerSms can send Chinese text SMS, how can I do the same thing for Korean. Any response would be appreciated. Thank in advance. Jay --~--~-~--~~~---~--~~ 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: missing javax audio?
Greets... I am an audio/graphics professional and my first project, for kicks, is to port my desktop Java Quake3 class game engine to Android and OpenGL ES as a test of well my ability to figure out ES and Android and it didn't take long to realize the state of audio in SDK 1.0 is not suitable for lots of audio stuff I'd like to accomplish in general and some novel features for my port (IE voice chat with desktop clients from built in mic on G1, etc; fun!). We'll see how the Q3 port turns out; gonna hack a file based push to talk feature most likely via MediaRecorder; delayed audio w/ this though and only one way to desktop clients to show proof of concept. I specifically did not adopt or even look at Android until a handset device was released and the SDK hit 1.0 simply because I knew the platform probably would not be complete and I don't have the time / desire to work around incomplete APIs / implementation (yes, was correct on that; for audio at least; lots of gold to be had elsewhere; seriously, kudos Android team et al, I haven't been this excited in a while!). So, yes, lets continue to discuss how to solve the audio issue that encroaches on all of us who want performance audio on Android and all 'droid devices in general. I will throw in my two cents on how I _am_ (not would be) solving it after dealing with the woes and inadequacies of Java Sound on the desktop _for years_ from an API perspective to simply incomplete implementations on various platforms and JVM versions. (Java Sound - Write once, test everywhe... oh wait you mean it doesn't fully work on X platform at all?.?. gah!!!) One solution on the desktop has been to ditch Java Sound and support PortAudio (www.portaudio.com) via JNI. I propose that Android can also provide the best and most _portable_ audio solution not only on the G1 and other devices, but _future_ hardware that supports Android by adopting PortAudio and exposing a lean and mean API to developers that then can be further extended with higher level APIs for purpose built processes (speech detection / Jspeex port / DSP processing, even a javax.sound implementation built _on top_ of PortAudio, etc). What is needed is simple and efficient raw audio I/O functionality at the core; PortAudio provides this and only this! For file I/O it's not a bad idea to support Libsndfile (http://www.mega-nerd.com/libsndfile/). Between PortAudio Libsndfile raw streaming and file based audio I/O can be solved by time tested open source solutions. Now... I mentioned future hardware supporting Android... I just so happen to be developing an embedded audio hardware product that focuses on advanced spatial processing (think large scale 2D and 3D sound arrays; I have a 32 speaker hemisphere setup at my facility in SF for instance; check here for those interested in an overview I published for the recent AES conference in SF w/ picts equipment specifications -- http://research.egrsoftware.com/conferences/2008/aes2008/) and after finally dipping into Android (IE G1 SDK 1.0 finally available) I've decided unanimously and almost instantly to ditch my current path which was Analog Devices Blackfin/Sharc based processors running uClinux and am switching to the TI OMAP3 3550 and Android as the processor/stack. In doing this I already am adopting PortAudio on my Android based hardware and this is how I plan to expose audio I/O to Android developers on my hardware. So in time this is _going_ to be done already. Seeing as there isn't a unified vision on where to take audio I/O for Android as is I do strongly propose supporting PortAudio out of it's shear elegance and wide activity and support in the audio community at large across numerous OSes / desktop to mobile. Not only will it provide a mean and lean audio API at the core, but it will be portable at its core between different hardware configurations on hand sets to say custom built audio hardware like my own efforts which will support high channel count analog, ADAT, and even MADI I/O. There is absolutely no reason to support Java Sound as the core implementation just because that is the most visible Java API for audio to the layman programmer; that would be archaic and quite honestly just silly. Audio professionals and people serious with audio and Java _likely_ concur. Anyway... Since I'm already planning PortAudio support with my own 'droid based hardware and it's _very_ applicable to Android as a whole for the entire developer community across all devices and isn't based on a trade marked open or proprietary company oriented API / implementation (SoniVox, sorry!), but a tried and true open source solution that is known to work for many widely adopted cross platform audio applications to great ASIO and device specific hardware it is a compelling way forward. I'll even go so far as offering to get on that black bus for a month or two and simply knock PortAudio support out quickly and efficiently for all... Hey.. I love open source, but that
[android-developers] Re: 802.1x, PEAP, Campus Domain tester
The HTC Vox, which shares the same Wifi Chipset as the G1 (Along with UMA Support) can perform wpa authentication. Let's keep hope alive. http://www.mikechannon.net/PDF%20Manuals/HTC%20VOX%20Service%20Manual.pdf WiFi Chipset: TNETW1251 Internal WLAN antenna IEEE 802.11b/g Date rate auto fallback for extended range ELP mode Security 802.11i and AES WPA/WPA 2 authentication – WEP (64 128bit), PSK, EAP-TLS, PEAP, LEAP Signaling interfaces between the terminal device and the servers: mutually authenticated and encrypted utilizing TLS (RFC 2246) with RC4 encryption with SGA1 used as the message integrity check On Nov 13, 1:01 pm, hyc [EMAIL PROTECTED] wrote: See this thread http://groups.google.com/group/android-developers/browse_thread/threa... It looks like the wifi device driver doesn't support the necessary features. On Nov 12, 10:29 am, Jolopicus [EMAIL PROTECTED] wrote: Developers! I am leading a group of students on my campus to use the G1 to it's fullest potential. The issue now is that there is no support/options forPEAPauthentication on our campus environment. We have some of the best wifi coverage of most campus's i've been to but it defeats the $200 bill of the G1 if i have to rely on the edge network. Is there any developers I can test configs for? I'll be a tester and can usually report back quickly. Needed configs for campus: -WPA - TKIP - 802.1 andPEAP - AD username and Pswd Thanks! Jolopicus --~--~-~--~~~---~--~~ 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] Application crashes on G1, but runs on emulator. Need help.
Guys, does anyone have G1? We published application (http:// andappstore.com/AndroidPhoneApplications/apps/3108), but it seems to be crashing on G1. It works fine on emulator. Could you load it on your phone and try to run. The feedback from users is not good. They only say thet app keeps on crashing. We need to know at least when it crashes: on start, during menu navigation or during gameplay (app is game). P.S. We could not test this by our own, because of our team location: Russia. There is no appotunity to get G1. --~--~-~--~~~---~--~~ 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] Back doesn't work when WebView has launched the real browser
Hi, the code is really simple, just the standard launch of a local webpage in the asset folder: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadUrl(file:///android_asset/index.html); } For this test index.html just contains a link to an external site. What I find is that the app shows this page in the WebView ok, the user can select the link, and they are taken off to that site in the real onboard android browser. But I want them to be able to press the back button then and be taken back to my app - they are not, the real browser just shuts down and they are left at the home screen. When this happens on a G1 I find I can then long press the home button and switch to my app as it was still running all along. I need this to be automatic - what have I missed please? --~--~-~--~~~---~--~~ 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] UMA Support
I found some glimmer of hope while searching for the wifi Chipset on the G1. It appears that the Texas Instruments TNETW1251 Wifi chipset does support UMA. Sooo.. given some time and kernel hacking, could the G1's UMA capable wifi chipset and others be incorporated in the Android OS? http://focus.ti.com.cn/pdfs/wtbu/tnetw1251_1253_prod_bulletin.pdf http://www.cdrinfo.com/Sections/News/Details.aspx?NewsId=13005 --~--~-~--~~~---~--~~ 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 inject a KeyEvent
Hi, I've been just wondering about these security issues, injecting events, access to some low level APIs, screen lock, telephony, etc. I've been developing on other mobile operating systems for years and all them allow this kind of technique, it's valuable for some kind of applications, mainly in corporate applications where the company wants the user with no access to phone features like downloads, games, etc, but only a limited set of features. My question is, would you consider adding all this 'privileged' APIs to the security in the manifest, with a 'red' level of alert to the user upon installation, with description of the potential risks, so that user can decide? I know Android core developers said they don't want user to decide, but in my oppinion it is really what should happen. Just my thought. Marcio Alexandroni www.cialogica.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Comunication between Google MapView and LocationListener
Hi all, I've implemented a Mapview in the main activity and used LocationListener to monitor the location. If the location changes, method public void onLocationChanged(Location location) will be called. But then how can I transfer the location data from Listener to the main activity where my mapview located? 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: Help me to test APK file on your real device
You can also checkout www.uTest.com. Good luck! R On Nov 22, 1:22 am, Peter [EMAIL PROTECTED] wrote: Hi Ulziisaikhan, There's a (fairly) new service that enables developers to test their mobile application on a real device by a variety of different testers: http://www.testarmy.com/ If you can't obtain (or afford) a real Android device then this could be a cheap option. Regards, Peter On Oct 10, 8:44 pm, Ulzii [EMAIL PROTECTED] wrote: Hi All, I have finished an application for the Android platform device. I am writing from Ulaanbaatar, Mongolia. It means there is no possibility to test apk file on real android gPhone device. Is there anyone who obtained gPhone, could you help me to test my APK file on your device. --~--~-~--~~~---~--~~ 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] error on my Mac 10.4 Power book: cannot execute binary file
While using Eclipse with the Android developers package I get the following error when I try and run one of the sample programs: I get cannot execute binary file; in addition I get when I restart eclipse I get an error stating Failed to parse the output of 'adb version'. I'm a first time user and newbee with this; greatly appreciate the help. I have it working fine on one of my Microsoft XP boxes, however I would rather work with this in my Mac environment. --~--~-~--~~~---~--~~ 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] Is it possible to add a custom link in the Share Picture Via dialog?
After taking a picture on the G1 the user is prompted with Save | Set As | Share | Delete. If Share is selected then they're taken to a Share Picture Via dialog. Currently the options Google mail and Messaging are in the dialog. I want to add a link to my program which can share the photo with a different service Is it possible to add a custom link in the Share Picture via dialog? 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: 802.1x, PEAP, Campus Domain tester
The HTC Vox, which shares the same Wifi Chipset as the G1 (Along with UMA Support) can perform wpa authentication. Let's keep hope alive. http://www.mikechannon.net/PDF%20Manuals/HTC%20VOX%20Service%20Manual.pdf WiFi Chipset: TNETW1251 Internal WLAN antenna IEEE 802.11b/g Date rate auto fallback for extended range ELP mode Security 802.11i and AES WPA/WPA 2 authentication – WEP (64 128bit), PSK, EAP-TLS, PEAP, LEAP Signaling interfaces between the terminal device and the servers: mutually authenticated and encrypted utilizing TLS (RFC 2246) with RC4 encryption with SGA1 used as the message integrity check On Nov 13, 1:01 pm, hyc [EMAIL PROTECTED] wrote: See this thread http://groups.google.com/group/android-developers/browse_thread/threa... It looks like the wifi device driver doesn't support the necessary features. On Nov 12, 10:29 am, Jolopicus [EMAIL PROTECTED] wrote: Developers! I am leading a group of students on my campus to use the G1 to it's fullest potential. The issue now is that there is no support/options for PEAP authentication on our campus environment. We have some of the best wifi coverage of most campus's i've been to but it defeats the $200 bill of the G1 if i have to rely on the edge network. Is there any developers I can test configs for? I'll be a tester and can usually report back quickly. Needed configs for campus: -WPA - TKIP - 802.1 and PEAP - AD username and Pswd Thanks! Jolopicus --~--~-~--~~~---~--~~ 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] Theme setting for all applications
Hello, I would like to ask you about how to change application theme. In case of application-specific theme, it is possible to change theme by asking your Activity to call setTheme(int theme). On the other hand, how can we change theme applicable to all applications which does not have their own theme? As you know, Windows OS has a theme setting which can be changed by an end-user in the display property of control panel. Does android platform support this feature? If Android platform does not support theme setting, I have the following solutions from developer point of view. (1) Modify themes.xml provided by Android framework as default, and then make a build. (/frameworks/base/core/res/res/values/themes.xml) (2) Change Android open source code to add new APIs for changing theme for all applications. Is there any other better solution to change theme for all applications? Regards, /Paul --~--~-~--~~~---~--~~ 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: missing javax audio?
Greets... Wow.. good thread and discussion thus far. Best and most recent audio thread I've seen. I am an audio/graphics professional and my first project, for kicks, is to port my desktop Java Quake3 class game engine to Android and OpenGL ES as a test of well my ability to get Q3 tech playing with ES and Android and it didn't take long to realize the state of audio in SDK 1.0_r1 is not suitable for lots of audio stuff I'd like to accomplish in general and some novel features for my port (IE voice chat with desktop clients from built in mic on G1, etc; fun!). We'll see how the Q3 port turns out; gonna hack a file based push to talk feature most likely via MediaRecorder; delayed audio w/ this though and only one way to desktop clients to show proof of concept. I specifically did not adopt or even look at Android until a handset device was released and the SDK hit 1.0 simply because I knew the platform probably would not be complete and I don't have the time / desire to work around incomplete APIs / implementation (yes, was correct on that; for audio at least; lots of gold to be had elsewhere; seriously, kudos Android team et al, I haven't been this excited in a while about a new tech!). So, yes, lets continue to discuss how to solve the audio issue that encroaches on all of us who want performance audio on Android and all 'droid devices in general. I will throw in my two cents on how I _am_ (not would be) solving it after dealing with the woes and inadequacies of Java Sound on the desktop _for years_ from an API perspective to simply incomplete implementations on various platforms and JVM versions. (Java Sound - Write once, test everywhe... oh wait you mean it doesn't fully work on X platform at all?.?. gah!!!) One solution on the desktop has been to ditch Java Sound and support PortAudio (www.portaudio.com) via JNI. I propose that Android can also provide the best and most _portable_ audio solution not only on the G1 and other devices, but _future_ hardware that supports Android by adopting PortAudio and exposing a lean and mean API to developers that then can be further extended with higher level APIs for purpose built processes (speech detection / Jspeex port / DSP processing, even a javax.sound implementation built _on top_ of PortAudio, etc). What is needed is simple and efficient raw audio I/O functionality at the core; PortAudio provides this and only this! For file I/O it's not a bad idea to support Libsndfile (http://www.mega-nerd.com/libsndfile/). Between PortAudio Libsndfile raw hardware and file based audio I/O can be solved by time tested open source solutions. Now... I mentioned future hardware supporting Android... I just so happen to be developing an embedded audio hardware product that focuses on advanced spatial processing (think large scale 2D and 3D sound arrays; I have a 32 speaker hemisphere setup at my facility in SF for instance; check here for those interested in an overview I published for the recent AES conference in SF w/ picts equipment specifications -- http://research.egrsoftware.com/conferences/2008/aes2008/) and after finally dipping into Android (IE G1 SDK 1.0 finally available and in my hands) I've decided unanimously and almost instantly to ditch my previous path which was Analog Devices Blackfin/ Sharc based processors running uClinux and am switching to the TI OMAP3 3550 and Android as the processor/stack. In doing this I already am adopting PortAudio on my future Android based hardware and this is how I presently plan to expose audio I/O to Android developers on my hardware. So in time this is _going_ to be done already. Seeing as there isn't a published / unified vision on where to take audio I/O for Android as is I do strongly propose supporting PortAudio out of it's shear elegance and wide activity and support in the audio community at large across numerous OSes / desktop to mobile. Not only will it provide a mean and lean audio API at the core, but it will be portable at its core between different hardware configurations on hand sets to say custom built audio hardware like my own efforts which will support high channel count analog, ADAT, audio over HDMI, and even MADI I/O in time. There is absolutely no reason to support Java Sound as the core implementation just because that is the most visible Java API for audio to the layman programmer; that would be archaic and quite honestly just silly which is nice to see folks mentioning in this thread Including David S. Audio professionals and people serious with audio and Java _likely_ concur. Anyway... Since I'm already planning PortAudio support with my own 'droid based hardware and it's _very_ applicable to Android as a whole for the entire developer community across all devices and isn't based on a trade marked open or proprietary company oriented API / implementation (SoniVox, sorry!), but a tried and true open source solution that is known to work for many widely adopted cross platform audio
[android-developers] Re: how can i reboot the device or lock the device using sdk?
Please help On 11月22日, 下午11时05分, forrestxu [EMAIL PROTECTED] wrote: I used Runtime run = Runtime.getRuntime(); run.exec(reboot); to reboot the device. but i am failed. On 11月22日, 下午11时03分, forrestxu [EMAIL PROTECTED] wrote: Hi Guys, Please help me to solve the problem listed as below: how can i reboot the device or lock the device using sdk? Many thanks, Forrest --~--~-~--~~~---~--~~ 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] AutoCompleteTextView without keyboard input
Hello, This is what i am doing, I have a AutoCompleteTextView that filters the contact names while you type them similar to what the sms app does right now. In my app I have a virtual keyboard and I need the same functionality to happen when I type with my VK. For example, When I open the keyboard I can put in K in this texfield and I will see a list with names starting with K, but if I press my k button I do not get anything. What I am doing is, concatenating strings into this textField, so when my k button is pressed I add a k to the string that is already there, my question is how can I have the TextView automatically start filtering when I press my button, I have looked and do not see anything that stands out in the API. 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] Tab Appearance
Hello, Is there a way to change tabs from the default, gigantic size, along with aligning the indicator at the top? Here's what I'm currently using: XML: TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=fill_parent/ FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingTop=65px /FrameLayout /TabHost Java: setContentView(R.layout.test); TabHost tabHost = getTabHost(); TabSpec tab = tabHost.newTabSpec(Main); tab.setContent(new Intent(this, Main.class)); tab.setIndicator(Main); tabHost.addTab(tab); Thanks in advance! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Tab Appearance
Hi, The current graphics have a size appropriate for touch screen that require the use of your fingers (as opposed to a stylus.) On Sun, Nov 23, 2008 at 7:20 PM, g1bb [EMAIL PROTECTED] wrote: Hello, Is there a way to change tabs from the default, gigantic size, along with aligning the indicator at the top? Here's what I'm currently using: XML: TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=fill_parent/ FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingTop=65px /FrameLayout /TabHost Java: setContentView(R.layout.test); TabHost tabHost = getTabHost(); TabSpec tab = tabHost.newTabSpec(Main); tab.setContent(new Intent(this, Main.class)); tab.setIndicator(Main); tabHost.addTab(tab); Thanks in advance! -- Romain Guy www.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Tab Appearance
Hmmm... I've seen apps that use tabs significantly smaller than that of the default ones. I believe that they can be modified. On Nov 23, 8:29 pm, Romain Guy [EMAIL PROTECTED] wrote: Hi, The current graphics have a size appropriate for touch screen that require the use of your fingers (as opposed to a stylus.) On Sun, Nov 23, 2008 at 7:20 PM, g1bb [EMAIL PROTECTED] wrote: Hello, Is there a way to change tabs from the default, gigantic size, along with aligning the indicator at the top? Here's what I'm currently using: XML: TabHost xmlns:android=http://schemas.android.com/apk/res/android; android:id=@android:id/tabhost android:layout_width=fill_parent android:layout_height=fill_parent TabWidget android:id=@android:id/tabs android:layout_width=fill_parent android:layout_height=fill_parent/ FrameLayout android:id=@android:id/tabcontent android:layout_width=fill_parent android:layout_height=fill_parent android:paddingTop=65px /FrameLayout /TabHost Java: setContentView(R.layout.test); TabHost tabHost = getTabHost(); TabSpec tab = tabHost.newTabSpec(Main); tab.setContent(new Intent(this, Main.class)); tab.setIndicator(Main); tabHost.addTab(tab); Thanks in advance! -- Romain Guywww.curious-creature.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Eclipse repo is down?
Try with this link: https://dl-ssl.google.com/android/eclipse/site.xml It works for me On Nov 22, 3:33 am, Bogomil Shopov [EMAIL PROTECTED] wrote: Hi all, There is no Eclipse repo available here:https://dl-ssl.google.com/android/eclipse/ Bogo --~--~-~--~~~---~--~~ 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: Keeping a Service Alive
Don't worry, apps that leave services running is a pet peeve of mine too. Making sure my service stops when it's supposed to is a priority of mine. On Nov 23, 7:47 pm, Dianne Hackborn [EMAIL PROTECTED] wrote: Please please please be sure to stop the service when it is no longer needed. For a media player, this generally means only having it in the running state when it is actively playing music; otherwise it should only be needed when there are clients bound to it. If you don't stop your services, then the system has to assume it is needed forever and can't remove your process to allow for other things the user is actually doing. I think this is actually one of our biggest third party application issues, applications that just starts a service and never stops it. This sucks for the user, and just should not be done. In fact there is already code in the system to look for services that have been running a long time without others doing things to them to let them be killed, but it's pretty clear we'll need to be even more brutal about this. :( (Which sucks for things that really do want to run for a long time, like a media player, but it's not clear at all to me what to do about them.) Also, there was a suggestion earlier to try running the service in another process. Multiple processes is again something to be careful of, and to stay away from unless you really need them -- processes are quite heavy-weight entities, so shouldn't be thrown around lightly. On Sun, Nov 23, 2008 at 12:42 PM, G [EMAIL PROTECTED] wrote: EUREKA! I've figured it out based on some of the documentation I missed. For those who also have trouble... The docs for ContextWrapper.startService(Intent service) includes the following line... Using startService() overrides the default service lifetime that is managed by bindService(Intent, ServiceConnection, int): it requires the service to remain running until stopService(Intent) is called, regardless of whether any clients are connected to it. This is the trick, simply run startService() before you attempt to bind to it! So before, my onCreate contained: bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); Now this has been replaced by: Intent i = new Intent(MDService.class.getName()); startService(i); bindService(i, mConnection, Context.BIND_AUTO_CREATE); After that change, calling unbindService(mConnection) does NOT destroy the service :) So starting a service by binding it from an activity links the service's life-cycle with that of the activity. While starting the Service first, gives it it's own lifecycle, and you can still bind to it right after. (And you still know the service will only actually be started once.) Also, doing this seems to have alleviated my 2nd problem that I described in my 1st post, but this requires a little more testing before i can confirm it. On Nov 23, 3:09 pm, G [EMAIL PROTECTED] wrote: I just realized that the in API Demo for Remote Service Binding, the service is destroyed when the activity is destroyed as well. So it's no help in this case. Can anyone point to a code sample in which a service outlives it's binding in an activity? Do I need to use a BroadcastReceiver or something? I'm very confused :( On Nov 23, 2:46 pm, G [EMAIL PROTECTED] wrote: That is what I've been trying to do, below is the service definition in my AndroidManifest.xml file service android:name=.MDService android:process=:remote intent-filter action android:name=com.episode6.android.carolla.MDService/ action /intent-filter /service And I bind the service in my activity with the following call... bindService(new Intent(MDService.class.getName()), mConnection, Context.BIND_AUTO_CREATE); And whenever I run unbindService(mConnection); the service still gets destroyed. On Nov 23, 1:52 pm, Mark Murphy [EMAIL PROTECTED] wrote: G wrote: 1) When my main activity is destroyed, my service is getting destroyed along with it. The service's onDestroy get's called, playback stops, the notification gets cleared. How can I avoid this? Have you tried making your service a remote service, one that runs in its own process? http://code.google.com/android/samples/ApiDemos/src/com/example/andro... I haven't tried a remote service yet myself, so I'm not 100% certain it will resolve this problem. -- Mark Murphy (a Commons Guy)http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml -- Dianne Hackborn Android framework engineer [EMAIL PROTECTED] 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
[android-developers] Fw: [android-developers] Re: Android and bluetooth
That means, I will have to forget BT until the next release of SDK? - Original Message - From: Mark Murphy [EMAIL PROTECTED] To: android-developers@googlegroups.com Sent: Friday, November 21, 2008 11:33 PM Subject: [android-developers] Re: Android and bluetooth developer wrote: Its really surprising me that android has no support for bluetooth Android has support for Bluetooth. Android does not have APIs for developers to use Bluetooth at this time. http://android-developers.blogspot.com/2008/08/some-information-on-apis-removed-in.html -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ 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] Open SubMenu programatically
Hi guys, anyone knows how to open a submenu using code? I only know how to open the menu itself using this snippet: this.getWindow().openPanel(Window.FEATURE_OPTIONS_PANEL, new KeyEvent (KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_MENU)); Regards, plusminus http://anddev.org # Worlds largest Android Development Community / Tutorials --~--~-~--~~~---~--~~ 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] What's wrong in my code ?
Hi All, This is the implementation of my SurfaceView Class @Override public void surfaceCreated(SurfaceHolder holder) { Log.v(My3DClass, surfaceCreated); egl = (EGL10)EGLContext.getEGL(); if(egl == null) Log.v(Error,unable to load EGL); EGLDisplay dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); if(dpy == null) Log.v(Error,unable to load Display); int[] version = new int[2]; egl.eglInitialize(dpy, version); if(version[0]1) Log.v(Error, unable to initilize version ); int[] configSpec = { EGL10.EGL_RED_SIZE, 5, EGL10.EGL_GREEN_SIZE, 6, EGL10.EGL_BLUE_SIZE, 5, //EGL10.EGL_ALPHA_SIZE, 0, EGL10.EGL_DEPTH_SIZE, 16, // EGL11.EGL_STENCIL_SIZE, EGL11.EGL_DONT_CARE, // don't care about stencils EGL10.EGL_SURFACE_TYPE, EGL10.EGL_WINDOW_BIT, EGL10.EGL_NONE }; EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; if(!egl.eglChooseConfig(dpy, configSpec, configs, 1, num_config)) Log.v(Error,unable to choose Config ); EGLConfig config = configs[0]; EGLContext ctx = egl.eglCreateContext(dpy, config, EGL10.EGL_NO_CONTEXT, null); if(ctx == null) Log.v(Error,unable to create context); EGLSurface surface = egl.eglCreateWindowSurface(dpy, config, this, null); if(surface == null) Log.v(Error,unable to create surface); if(!egl.eglMakeCurrent(dpy, surface, surface, ctx)) Log.v(Error,unable to make surface current); mEglContext = ctx; mEglDisplay = dpy; mEglSurface = surface; } @Override public void surfaceChanged(SurfaceHolder arg0, int arg1, int arg2, int arg3) { gl = (GL10)mEglContext.getGL(); if(gl == null) Log.v(Error,unable to load G L); gl.glViewport(0, 0, getWidth(),getHeight()); gl.glDisable(GL10.GL_DITHER); gl.glClearColor(0,1,1,0); gl.glEnable(GL10.GL_SCISSOR_TEST); gl.glScissor(0, 0, arg2, arg3); gl.glClear(GL10.GL_COLOR_BUFFER_BIT); egl.eglWaitNative(EGL10.EGL_NATIVE_RENDERABLE, null); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); GLU.gluPerspective(gl, 45f, getWidth()/getHeight(), 0.1f, 100); gl.glMatrixMode(GL10.GL_MODELVIEW); mAnimate = true; Draw3D(); } public void Draw3D() { egl.eglWaitNative(EGL10.EGL_NATIVE_RENDERABLE, null); gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glLoadIdentity(); GLU.gluLookAt(gl, 0, 0, -20, 0, 0, 0, 0, 1, 0); gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glFrontFace(GL10.GL_CCW); gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mVertexBuffer); gl.glDrawElements(GL10.GL_TRIANGLE_STRIP, 3, GL10.GL_UNSIGNED_SHORT, mIndexBuffer); egl.eglWaitGL(); egl.eglSwapBuffers(mEglDisplay, mEglSurface); } @Override public void run() { while(true) { Draw3D(); } i don't find my screen rendering... is there any problem in my code... Please suggest... thanks regards, K.Prabhakar --~--~-~--~~~---~--~~ 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 display map with chinese text in MapView?
Hi, I am using MapView compment component in my program, it works fine. But all map text is english, how can i change it to chinese? Anyone can help me? Regards Knight Li --~--~-~--~~~---~--~~ 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: ViewFlipper onFlipListener
I think that is my best bet. Thanks loty On Nov 21, 5:02 pm, loty [EMAIL PROTECTED] wrote: Ok, I guess I misunderstood. Well you can use Timer object to initiate your flips instead of doing setFlipInterval and startFlipping. This way you can do whatever you want before and after each flip. On Nov 21, 7:40 am, Ngewi [EMAIL PROTECTED] wrote: Yes,ViewFlippercan flip on its own. When you call setFlipInterval (int timeInMs) and then call startFlipping() the flipper will switch the views every timeInMs millisecs. I can handle the flips that I trigger manually, but I want to also handle them when they are automatic. There is the possibility of using a Timer object and scheduling a TimerTask to run every timeInMs, but this does not provide accuracy. i.e. I do not have a guarantee that the timing is synchronized, so I cannot achieve the goal of performing an action just before showing the next view. I was just wondering if there is a better way to do this. Thanks for your response. On Nov 20, 7:30 pm,loty[EMAIL PROTECTED] wrote: I don't understand it - you tellViewFlipperto flip views, it doesn't flip anything on it's own. So why can't you keep track of your views in the event handler that initiates your flips? On Nov 20, 4:38 am, Ngewi [EMAIL PROTECTED] wrote: Hi everyone, I am using theViewFlipperclass with automatic flipping through views. Is there a way to get notified or register a listener to be called each time just before a new child view is displayed. (i.e with automatic flipping ). So far I have not seen any listeners in the documentation for this purpose. I would also like to use this to check, each time a view is loaded, if it is the last and return to the calling activity instead wrapping around to start from the beginning of theViewFlipperchild views. If someone has any bright ideas please share. 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 -~--~~~~--~~--~--~---