[android-developers] Re: Looking for Accelerometer Example
Hi Kwilliaa, I've started an open source project that uses the accelerometer to dispay a three axis artificial horizon here: http://code.google.com/p/androidcompass/ You can download the finished product from the Market. It's called 'New Horizons'. It's based on some detailed worked examples in my book, Professional Android Application Development. Hope it helps! Cheers Reto Meier Author, Professional Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On Jan 23, 5:52 am, kwilliaa wrote: > Where can I find a simple example application that uses the > Accelerometer Sensor? > > I've seen the Open Intents applications, but I'd rather use the raw > Android API, at least until I understand it a little better. I'm > surprised at the lack of documentation. > > thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: New Android Book: Professional Android Application Development
Thanks Thustle. It ended up shipping a week or two early, so hopefully it'll get to you sooner than Amazon UK thinks :) On Nov 24, 4:22 pm, Thustle <[EMAIL PROTECTED]> wrote: > Congratulations Reto. > > I've pre-ordered the book, and I'm sure it'll be a big help. Amazon UK > is still saying I'll have to wait while 10th Dec though :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 Book: Professional Android Application Development
Aplogies for this blatant self-promotion, but after many months of at times frustrating work, I'm extremely proud to announce the release of "Professional Android Application Development" through Wrox Press. http://www.amazon.com/gp/product/0470344717?tag=interventione-20 I believe it's the first fully 1.0 complient book available in dead- tree format. Happily, I've been able to make some free resources available as part of the release, including two free chapters as PDFs! Chapter 1 introduces Android and points out some of its features and advantages. http://android.radioactiveyak.com/book-resources/downloads/Pro_Android_Dev_CH01.pdf Chapter 7 Details how to use maps, location-based services, and the geocoder http://android.radioactiveyak.com/book-resources/downloads/Pro_Android_Dev_CH07.pdf You can find links to these and other resources, including code downloads for all the tutorials and examples used in the book, from the book's Android Resource Portal: http://android.radioactiveyak.com Thanks to all the Android developers on these forums -- both offical Googlers and other, like myself, learning it from the outside -- who helped make this possible. Hopefully some of you will find the book helpful for your own Android development experience. Cheers Reto Meier Author, Professional Android Application Development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Replacing Dialer, IM, and SMS Apps
I've found the answer to some of these questions independantly, so I'll answer myself here for the reference of others: 1) Intercepting SMS Messages. The helper strings and methods to simplify intercepting incoming SMS messages have been removed, but you can still listen for (and read) incoming messages manually: http://groups.google.co.uk/group/android-developers/msg/f7808980db6fc5cf 2) Hidden Content Providers. The open access guarantees don't necessarily grant access to the underlying content providers that power the native applications. At the moment (this might change) access to the native mail, SMS, and IM Content Providers is not available. 3) Telephony APIs. You can listen for incoming / outgoing calls but you can't interact with them. That means you can replace the dialer (fire the DIAL action to initiate the call), but you can't (yet) replace the 'in-call' screen that lets users answer and end calls. 4) Instant Messaging. There's not API to support any sort of instant messaging in the 1.0 r1 release. Cheers Reto - Professional Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On 24 Sep, 10:55, Reto Meier <[EMAIL PROTECTED]> wrote: > In the early days of Android it was suggested that 3rd party > developers would be able to replace any of the 'native' Google > applications -- including the Dialer, IM client, and SMS application. > > After having a look at the 1.0 SDK it seems this isn't possible for > the first release. Is this the case? Can a Googler give us some > feedback on exactly what's been restricted so we don't waste too much > time looking for something that isn't there? :) > > It would also be good to know if you're planning on opening up access > later. > > From what I can tell so far, the following is now restricted: > - Receiving Intents for incoming SMS messages. > - Access to the SMS, IM, mail, etc. Content Providers. > - A telephony API to start, end, and manage calls. > - An Instant Messaging (GTalkService) API. Specifically the ability to > send / receive IM TEXT messages. > > There's more, but these are the main ones I can't find in 1.0 that > were available in 0.9. > > Cheers > Reto Meier > > > Professional Android Application > Developmenthttp://www.amazon.com/gp/product/0470344717?tag=interventione-20 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Receiving SMS Messages in 1.0?
There's a bit of confusion upthread, so I'm just confirming that Cristina's code sample works perfectly. Using it you can listen for incoming SMS messages and extract each message from the Intent. Thanks Christina! Cheers Reto Meier - Professional Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On 24 Sep, 14:03, Cristina <[EMAIL PROTECTED]> wrote: > Sorry I misundertand your message.. > > Yes I have tried that part of the application (receiving a text sms) > and works for me. > > I have send the message using the DDMS send utility... > Maybe you can use the debugger in order to see if you are receiving > the intent bundle with the extra "pdus"... > Using the debugger I discovered that the intent bundle has this "pdus" > extra, which is an Object[]. > Each Object[] element is a pdu (byte[]) > > Can you see this using the debugger? Where is your application > failing? > > Cristina > > On 24 sep, 14:20, "De San Nicolas Jean Philippe" <[EMAIL PROTECTED]> > wrote: > > > > > Hello, I've tried your code but it failed! my application failed. Have you > > tried and succeed? > > > 2008/9/24 Cristina <[EMAIL PROTECTED]> > > > > Hi, > > > > I do not know if it is the right way, but I have found a way to get > > > the message. > > > Here I include my code to get the SmsMessages. I hope it helps you > > > > public class ServerMessagesReceiver extends BroadcastReceiver { > > > > static final String ACTION = > > > "android.provider.Telephony.SMS_RECEIVED"; > > > > public void onReceive(Context context, Intent intent) { > > > if (intent.getAction().equals(ACTION)) { > > > StringBuilder buf = new StringBuilder(); > > > Bundle bundle = intent.getExtras(); > > > if (bundle != null) { > > > Object[] pdusObj = (Object[]) bundle.get("pdus"); > > > SmsMessage[] messages = new > > > SmsMessage[pdusObj.length]; > > > for (int i = 0; i > > messages[i] = SmsMessage.createFromPdu > > > ((byte[]) pdusObj[i]); > > > } > > > > > > > > > ... > > > > By the way, Does somebody know how to receive an SMS that has been > > > sent using > > > an application port using the methos.sendDataMessage? > > > > On 24 sep, 08:15, Reto Meier <[EMAIL PROTECTED]> wrote: > > > > Is it still possible to listen for incoming SMS messages in the latest > > > > 1.0 SDK release? > > > > > The SMS_RECEIVED_ACTION string used to listen for incoming SMS > > > > messages seems to have gone missing. It used to be available from the > > > > android.provider.Telephony.Sms package, which also seems to have > > > > disappeared, so getMessagesFromIntent has gone too. > > > > > Previously, you could create a Broadcast Receiver to listen for SMS > > > > messages using this code: > > > > > String incoming_SMS = > > > > android.provider.Telephony.Sms.Intents.SMS_RECEIVED_ACTION; > > > > > public void onReceive(Context _context, Intent _intent) { > > > > > if (_intent.getAction().equals(incoming_SMS)) { > > > > SmsManager sms = SmsManager.getDefault(); > > > > SmsMessage[] messages = > > > > Sms.Intents.getMessagesFromIntent(_intent); > > > > } > > > > > Is there still a way to do this? > > > > > Thanks > > > > Reto- Ocultar texto de la cita - > > > - Mostrar texto de la cita -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Is there any book on development with Android ?
Hi Dave, Seems like a good a time as any to plug my own book :) Professional Android Application Development will by out November 17 and it's fully up-to-date with SDK 1.0. As timbobsteve pointed out, check out Amazon and you'll see there's a couple more scheduled to come out around the same time, give or take a couple of weeks. There's also a couple of books available, but AFAIK they all use a pre 0.9 beta SDKs (m3 and/or m5 I think). Cheers Reto Meier Professional Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On Sep 26, 3:44 pm, dave <[EMAIL PROTECTED]> wrote: > Because Android 1.0 has been released, I wonder if there is any book > on development with Android or anybody is writing one. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: SMS Intents Missing From 1.0?
The helper methods have disappeared but you can still listen for the Intent by using the String literal and extract the messages manually. This thread has the details: http://groups.google.co.uk/group/android-developers/browse_thread/thread/c51383cc8761ffd5# Cheers Reto Professional Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On 25 Sep, 00:00, blim <[EMAIL PROTECTED]> wrote: > Our application needs to be able to listen to incoming SMS messages > but android.providers.Telephony.Sms.Intents class has been removed > from 1.0. > > Does anybody know where this has been moved to or if we should be > using something else? I haven't been able to find anything on the > issue or why it was removed after 0.9. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Test Location Providers in 1.0
That might force the emulator to turn on the GPS (this was insufficient for me in 0.9, I still needed to enable and activate the GPS provider in code first). I haven't had a chance to test in 1.0 yet. Either way, it still only covers part of the problem. The test-location-provider-thing also lets you emulate the GPS being turned on / off, mock it's availability, and programatically modify the current location. It also lets you experiment with alternative location services that have different capabilities than the built-in GPS and Network providers. All that stuff was useful, it would be a shame if it's gone now. Cheers Reto Professinal Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On 24 Sep, 16:48, Stefan Handschuh <[EMAIL PROTECTED]> wrote: > The test-location-provider-thing was unnecessary form the start. > > You have to do just one thing: implement a service that continiously > updates you current location. Thats all. > > On 24 Sep., 11:21, Guillaume Perrot <[EMAIL PROTECTED]> wrote: > > > > > I was wondering too, I had to disable this function from my > > application... > > It seems we can only use DDMS or telnet to simulate location now. > > > On 24 sep, 08:34, Reto Meier <[EMAIL PROTECTED]> wrote: > > > > The ability to create and configure mock location providers that was > > > added in Beta 0.9 doesn't seem available in 1.0. > > > > Has this functionality been moved / renamed or has it been dropped > > > entirely for version 1? If the latter, how do we now mock the status > > > and availability of Location Providers? > > > > Cheers > > > Reto- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Mock Location Providers in 1.0
Unfortunately I don't have a good answer for you, but we've been discussing the same question here: http://groups.google.com/group/android-developers/browse_thread/thread/7005933e731de0f3# Professonal Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 On Sep 24, 4:22 pm, Cristina <[EMAIL PROTECTED]> wrote: > Hi! > > I have downloaded SDK 1.0 this morning, so I have tried to migrate > some code I have to this version. > When trying to migrate MockLocationProvider I found that some methods > have dissapeared from LocationManager: > setTestProviderEnabled > addTestProvider > > It seems that it not possible to create a Mock Provider by code any > more... > > I have also checked DDMS Location controls, but they seem to not be > working either in this version. > Maybe I am doing something wrong, but I have tried kml and gpx. In > both cases my kml/gpx files loads ok, but when I click on "play" > button, my application does not receive the locations. > > I have test the geo command, and it works...so by the moment I am > using this, although it is a little hard to write every point in order > to do tests... > > Has anybody managed to make DDMS locations tools to work in 1.0? Is it > possible to create a mock location provider by code in this version? > Is there any other way to automate this? maybe an script that calls > geo utility? > > 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] Replacing Dialer, IM, and SMS Apps
In the early days of Android it was suggested that 3rd party developers would be able to replace any of the 'native' Google applications -- including the Dialer, IM client, and SMS application. After having a look at the 1.0 SDK it seems this isn't possible for the first release. Is this the case? Can a Googler give us some feedback on exactly what's been restricted so we don't waste too much time looking for something that isn't there? :) It would also be good to know if you're planning on opening up access later. >From what I can tell so far, the following is now restricted: - Receiving Intents for incoming SMS messages. - Access to the SMS, IM, mail, etc. Content Providers. - A telephony API to start, end, and manage calls. - An Instant Messaging (GTalkService) API. Specifically the ability to send / receive IM TEXT messages. There's more, but these are the main ones I can't find in 1.0 that were available in 0.9. Cheers Reto Meier Professional Android Application Development http://www.amazon.com/gp/product/0470344717?tag=interventione-20 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Receiving SMS Messages in 1.0?
> please also include sending SMS capability in 1.0 >From what I've seen it looks like sending SMS is still supported in 1.0, it's just receiving SMSs that's changed / gone. On Sep 24, 9:57 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > In reply please also include sending SMS capability in 1.0 for > background connection to the cloud reasons > > On Sep 24, 1:15 am, Reto Meier <[EMAIL PROTECTED]> wrote: > > > > > Is it still possible to listen for incoming SMS messages in the latest > > 1.0 SDK release? > > > The SMS_RECEIVED_ACTION string used to listen for incoming SMS > > messages seems to have gone missing. It used to be available from the > > android.provider.Telephony.Sms package, which also seems to have > > disappeared, so getMessagesFromIntent has gone too. > > > Previously, you could create a Broadcast Receiver to listen for SMS > > messages using this code: > > > String incoming_SMS = > > android.provider.Telephony.Sms.Intents.SMS_RECEIVED_ACTION; > > > public void onReceive(Context _context, Intent _intent) { > > > if (_intent.getAction().equals(incoming_SMS)) { > > SmsManager sms = SmsManager.getDefault(); > > SmsMessage[] messages = > > Sms.Intents.getMessagesFromIntent(_intent); > > } > > > Is there still a way to do this? > > > Thanks > > Reto- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Test Location Providers in 1.0
The ability to create and configure mock location providers that was added in Beta 0.9 doesn't seem available in 1.0. Has this functionality been moved / renamed or has it been dropped entirely for version 1? If the latter, how do we now mock the status and availability of Location Providers? Cheers Reto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Receiving SMS Messages in 1.0?
Is it still possible to listen for incoming SMS messages in the latest 1.0 SDK release? The SMS_RECEIVED_ACTION string used to listen for incoming SMS messages seems to have gone missing. It used to be available from the android.provider.Telephony.Sms package, which also seems to have disappeared, so getMessagesFromIntent has gone too. Previously, you could create a Broadcast Receiver to listen for SMS messages using this code: String incoming_SMS = android.provider.Telephony.Sms.Intents.SMS_RECEIVED_ACTION; public void onReceive(Context _context, Intent _intent) { if (_intent.getAction().equals(incoming_SMS)) { SmsManager sms = SmsManager.getDefault(); SmsMessage[] messages = Sms.Intents.getMessagesFromIntent(_intent); } Is there still a way to do this? Thanks Reto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: MediaRecord Audio - working example? / raw data stream onPictureTaken()? / Bug in Pictures application?
Hi Justin, I've tried explicitly including the display name (and artist and album) into the new ContentValue but still end up with exactly the same error on the ContentResolver.insert call. On Aug 27, 10:56 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]> wrote: > > Error: > > > 08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content > > Creation No.5 date_added=1219598838 _display_name= album_id=2 > > title_key= - E C O 1 C O - > > K 1 ) O 9 E C C E &„ artist_id=3 using INSERT INTO > > audio_meta(title, date_added, _display_name, album_id, title_key, > > artist_id) VALUES(?, ?, ?, ?, ?, ?); > > From the error it jumps out at me that you're not setting > MediaStore.Audio.Media.DISPLAY_NAME, which seems like its required. > Also, are you setting the ALBUM_ID and ARTIST_ID somehow or are they > encoded in the URI you're using? > > Cheers, > Justin > Android Team @ Google > > On Aug 24, 3:20 pm, code_android_festival_way > > <[EMAIL PROTECTED]> wrote: > > I've got two questions. > > > 1) > > Is there a working example for recording audio with the MediaRecorder? > > At the moment I'm using the following setup but it doesnt work: > > >http://paste.pocoo.org/show/83242/ > > > Error: > > > 08-24 19:27:18.675: ERROR/Database(178): Error inserting title=Content > > Creation No.5 date_added=1219598838 _display_name= album_id=2 > > title_key= - E C O 1 C O - > > K 1 ) O 9 E C C E &„ artist_id=3 using INSERT INTO > > audio_meta(title, date_added, _display_name, album_id, title_key, > > artist_id) VALUES(?, ?, ?, ?, ?, ?); > > > I've tried the example provided in the docs (Media API) but that > > doesn't work at all. It would be nice if someone could provide a > > working example. > > > 2) > > Is it normal that the raw data stream returned by onPictureTaken(...) > > is null? > > > 3) > > > I'm taking pictures as above mentioned. After that I'm saving the > > available jpeg stream into the image ContentProvider which works fine. > > Now I'm leaving my app and try to start the "Pictures" application > > from the home screen. And now I get the following error message: > > >http://img.skitch.com/20080824-mrbc7yuhfh7an5ynndj9hm6twp.jpg > > > Here is the error from the logs: > > > 08-25 00:15:34.007: ERROR/AndroidRuntime(220): > > java.lang.RuntimeException: Unable to resume activity > > {com.android.camera/com.android.camera.GalleryPicker}: > > java.lang.NullPointerException > > > I can savely say that I'm calling camera.stopPreview() and > > camera.release() so there shouldn't be a problem with the camera. What > > else could be wrong? > > > Here is the part where I'm saving my jpeg byte[] into the > > ContentProvider: > > >http://paste.pocoo.org/show/83246/ > > > Regards! > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Announcing the new Android 0.9 SDK beta! http://android-developers.blogspot.com/2008/08/announcing-beta-release-of-android-sdk.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---