[android-developers] Re: Intent.ACTION_SYNC no docs or resolveInfo

2010-02-22 Thread Alex Corbi
So, for those interessted on the issue.

joebowbeer's suggestion does not seem to work, the Broadcast receiver
is never activated with that Intent.

The solution was to register a ContentObserver that listens to the
Gmail content provider (content://gmail-ls/) , each time the data
set is being changed, a callback function would be called.


On 19 Feb., 20:40, Alex Corbi a.co...@gmail.com wrote:
 Thanks joe i will try that out,

 is that info reliable Mark???

 Thank you guys.

 On Feb 19, 7:56 pm, joebowbeer joe.bowb...@gmail.com wrote:



  On Feb 18, 11:35 pm,AlexCorbia.co...@gmail.com wrote:

   What interest me is detecting when new GMail is being received.

  Intent.ACTION_PROVIDER_CHANGED doc says

  GmailProvider sends this notification when the set of unread mail in
  the inbox changes.

  (Though I haven't used this so you'll need to be the bloodhound and
  determine if this is for real, or if it is a red herring.)

-- 
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: android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

2010-02-22 Thread Alex Corbi
btw, have you tried it already? works?

On 17 Feb., 09:16, Dongjoon Lee sky...@gmail.com wrote:
 Hi.

 If the bluetooth headset is connected, system send this intent.
 android.bluetooth.intent.action.HEADSET_STATE_CHANGED

 So you can receive that and get extra information.
 For extracting extra information, use this intent.
 android.bluetooth.intent.HEADSET_STATE
 Through this you can get bluetooth headset connection state.
 disconnected, connecting, connected.

 I'm not sure my answer satisfies your question.

 On 1월15일, 오전5시19분,AlexCorbia.co...@gmail.com wrote:



  Hi Nick,

  Can you tell me please which devices use ACL Connections, do common
  bluetooth handsfree devices (like the ones present in cars ) use this
  transfer protocol?

  I am researching this to implement a new functionality on my app Voice
  Alerts (+info -http://49ers.es/corbi/voice-alerts) so the app
  activates automatically when the phone gets connected with a bluetooth
  headset or car system.

  i appreciate the help,

  Best regards..

 Alex.

  On Jan 12, 5:01 am, Nick Pelly npe...@google.com wrote:

   On Mon, Jan 11, 2010 at 5:27 PM,AlexCorbia.co...@gmail.com wrote:
Hi Nick,

Thanks for your answer.

What i am trying to do is to detect when a bluetooth headset device
connect to the phone so my app can react to this event.

is there an alternative?

   For the requirement you stated there is no public API option. But
   maybe you can explain what your app wants to do when a BT headset
   connects, and I might know a better option. For example ACL_CONNECTED
   will tell you when a low level ACL connection is established and is
   part of the public API.

   Alex

On Jan 11, 6:17 am, Nick Pelly npe...@google.com wrote:
On Mon, Jan 11, 2010 at 7:40 AM,AlexCorbia.co...@gmail.com wrote:
 HI everybody,

 im currently looking for the way that my app knows when the phone has
 being paired and connected to a bluetooth headset device.

 I read something about this intent, but not on the Reference
 documentation ofhttp://developer.android.com

 android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

 is this actually working, is it officially supported.

 I mean, can we just register a broadcastreceiver to handle this
 intent , check for the EXTRA_STATE string extra to see if it equals
 STATE_CONNECTED and be sure that the phone is now connected with a
 bluetooth headset device ???

 What about this BluetoothA2dpService class?? There is no official
 documentation about this, everything i found i from code snippets of
 the android OS source code.

 What do you guys think about this?

It's not part of the official Android API. So it is very dangerous to
use, since it can (and probably will) break in a future OTA. It might
not work at all on some Android devices, since Android devices are
only required to implement the official API.

There is currently no way to determine if a Bluetooth device is
connected to the built-in Bluetooth headset service through the
official API.

If you can explain what you are trying to do, I might be able to
suggest a better alternative?

Nick

--
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

-- 
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: Intent.ACTION_SYNC no docs or resolveInfo

2010-02-19 Thread Alex Corbi
Anybody had some experience with this?

On 19 Feb., 08:35, Alex Corbi a.co...@gmail.com wrote:
 Ok Thanks Dianne,

 What interest me is detecting when new GMail is being received.

 Wich is the uri of the Gmail content provider?

 content://gmail-ls ???

 is there any documentation somewhere about how the information is
 being stored in this Content-Provider.

 On Feb 19, 4:03 am, Dianne Hackborn hack...@android.com wrote:



  There is really no such thing as a global data sync.  You can write a
  SyncAdapter to take care of syncing with a particular content provider, and
  decide when to sync.  You can register a ContentObserver to see when the
  data inside of a content provider changes.  A global concept of sync isn't
  really there.

  On Thu, Feb 18, 2010 at 2:09 PM,AlexCorbia.co...@gmail.com wrote:
   HI,

   is there a way for an app to know when a data sync happens?

   It would be just great to be able to Register a BroadcastReceiver and
   handle that action, in my case instead of fire a data synchronization
   i would like to detect when it happens.

   is it possible?

   On Jan 25, 6:59 pm, Dianne Hackborn hack...@android.com wrote:
You don't need to force a sync, when data changes on the servers the
   device
is told and will get it.

This action probably should never have been made public, and I don't
   think
it does anything at this point.

On Mon, Jan 25, 2010 at 9:44 AM, Vikas1976 vikas.shah.1...@gmail.com
   wrote:

 I am on board with this.  I have an app that sends a new entry to
 Google Calendar in the cloud; I would like to be able to force a sync
 with Google after adding the entry so that the entry shows up in the
 user's calendar on the device shortly after being added.  Is there
 anyone who has experience using ACTION_SYNC to let us know what sort
 of other information e.g. category or data that needs to be passed to
 the resolver in the intent to let the phone know to sync with Google?
 Does anyone know if the AccountManager is a way to get this done?

 Vikas

 On Jan 20, 12:20 pm, Arno den Hond arnodenh...@gmail.com wrote:
  i would like to trigger the synchronize now feature (in the sync
  settings screen) from my app.
  i have found Intent.ACTION_SYNCbut the documentation states

  Activity Action: Perform a data synchronization.
  Input: ?
  Output: ?

  after creating the intent according to the action name, i used
  PackageManager's queryIntentActivities method (with flag
  GET_INTENT_FILTERS) and found that no ResolveInfo objects are
   returned

  ideas on how to perform a data synchronization would be greatly
  appreciated

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@googlegroups.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
 For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see
   and
answer them.

   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
cr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see and
  answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Intent.ACTION_SYNC no docs or resolveInfo

2010-02-19 Thread Alex Corbi
Sure, i know... you mean there is no possibility of knowing when new
emails (from gmail) are being received? What about other Emails from
accounts registered on the Email app?

But there are ways to read the new emails in Gmail (I currently use a
port for Android of the javaMail library to access through Imap)

I just want to know when exactly are new emails on the INBOX to handle
them...#




On 19 Feb., 13:36, Mark Murphy mmur...@commonsware.com wrote:
 AlexCorbiwrote:
  Ok Thanks Dianne,

  What interest me is detecting when new GMail is being received.

  Wich is the uri of the Gmail content provider?

  content://gmail-ls ???

  is there any documentation somewhere about how the information is
  being stored in this Content-Provider.

 GMail is not part of the Android SDK, nor does it ship on all Android
 devices.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 _Android Programming Tutorials_ Version 1.0 In Print!

-- 
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: Intent.ACTION_SYNC no docs or resolveInfo

2010-02-19 Thread Alex Corbi
Thanks joe i will try that out,

is that info reliable Mark???

Thank you guys.

On Feb 19, 7:56 pm, joebowbeer joe.bowb...@gmail.com wrote:
 On Feb 18, 11:35 pm, Alex Corbi a.co...@gmail.com wrote:



  What interest me is detecting when new GMail is being received.

 Intent.ACTION_PROVIDER_CHANGED doc says

 GmailProvider sends this notification when the set of unread mail in
 the inbox changes.

 (Though I haven't used this so you'll need to be the bloodhound and
 determine if this is for real, or if it is a red herring.)

-- 
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: Intent.ACTION_SYNC no docs or resolveInfo

2010-02-18 Thread Alex Corbi
HI,

is there a way for an app to know when a data sync happens?

It would be just great to be able to Register a BroadcastReceiver and
handle that action, in my case instead of fire a data synchronization
i would like to detect when it happens.

is it possible?

On Jan 25, 6:59 pm, Dianne Hackborn hack...@android.com wrote:
 You don't need to force a sync, when data changes on the servers the device
 is told and will get it.

 This action probably should never have been made public, and I don't think
 it does anything at this point.

 On Mon, Jan 25, 2010 at 9:44 AM, Vikas1976 vikas.shah.1...@gmail.comwrote:





  I am on board with this.  I have an app that sends a new entry to
  Google Calendar in the cloud; I would like to be able to force a sync
  with Google after adding the entry so that the entry shows up in the
  user's calendar on the device shortly after being added.  Is there
  anyone who has experience using ACTION_SYNC to let us know what sort
  of other information e.g. category or data that needs to be passed to
  the resolver in the intent to let the phone know to sync with Google?
  Does anyone know if the AccountManager is a way to get this done?

  Vikas

  On Jan 20, 12:20 pm, Arno den Hond arnodenh...@gmail.com wrote:
   i would like to trigger the synchronize now feature (in the sync
   settings screen) from my app.
   i have found Intent.ACTION_SYNCbut the documentation states

   Activity Action: Perform a data synchronization.
   Input: ?
   Output: ?

   after creating the intent according to the action name, i used
   PackageManager's queryIntentActivities method (with flag
   GET_INTENT_FILTERS) and found that no ResolveInfo objects are returned

   ideas on how to perform a data synchronization would be greatly
   appreciated

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Intent.ACTION_SYNC no docs or resolveInfo

2010-02-18 Thread Alex Corbi
Ok Thanks Dianne,

What interest me is detecting when new GMail is being received.

Wich is the uri of the Gmail content provider?

content://gmail-ls ???

is there any documentation somewhere about how the information is
being stored in this Content-Provider.

On Feb 19, 4:03 am, Dianne Hackborn hack...@android.com wrote:
 There is really no such thing as a global data sync.  You can write a
 SyncAdapter to take care of syncing with a particular content provider, and
 decide when to sync.  You can register a ContentObserver to see when the
 data inside of a content provider changes.  A global concept of sync isn't
 really there.





 On Thu, Feb 18, 2010 at 2:09 PM, Alex Corbi a.co...@gmail.com wrote:
  HI,

  is there a way for an app to know when a data sync happens?

  It would be just great to be able to Register a BroadcastReceiver and
  handle that action, in my case instead of fire a data synchronization
  i would like to detect when it happens.

  is it possible?

  On Jan 25, 6:59 pm, Dianne Hackborn hack...@android.com wrote:
   You don't need to force a sync, when data changes on the servers the
  device
   is told and will get it.

   This action probably should never have been made public, and I don't
  think
   it does anything at this point.

   On Mon, Jan 25, 2010 at 9:44 AM, Vikas1976 vikas.shah.1...@gmail.com
  wrote:

I am on board with this.  I have an app that sends a new entry to
Google Calendar in the cloud; I would like to be able to force a sync
with Google after adding the entry so that the entry shows up in the
user's calendar on the device shortly after being added.  Is there
anyone who has experience using ACTION_SYNC to let us know what sort
of other information e.g. category or data that needs to be passed to
the resolver in the intent to let the phone know to sync with Google?
Does anyone know if the AccountManager is a way to get this done?

Vikas

On Jan 20, 12:20 pm, Arno den Hond arnodenh...@gmail.com wrote:
 i would like to trigger the synchronize now feature (in the sync
 settings screen) from my app.
 i have found Intent.ACTION_SYNCbut the documentation states

 Activity Action: Perform a data synchronization.
 Input: ?
 Output: ?

 after creating the intent according to the action name, i used
 PackageManager's queryIntentActivities method (with flag
 GET_INTENT_FILTERS) and found that no ResolveInfo objects are
  returned

 ideas on how to perform a data synchronization would be greatly
 appreciated

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.comandroid-developers%2Bunsubs
  cr...@googlegroups.com
For more options, visit this group at
   http://groups.google.com/group/android-developers?hl=en

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
  and
   answer them.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

2010-01-14 Thread Alex Corbi
Hi Nick,

Can you tell me please which devices use ACL Connections, do common
bluetooth handsfree devices (like the ones present in cars ) use this
transfer protocol?

I am researching this to implement a new functionality on my app Voice
Alerts (+info - http://49ers.es/corbi/voice-alerts) so the app
activates automatically when the phone gets connected with a bluetooth
headset or car system.

i appreciate the help,

Best regards..

Alex.

On Jan 12, 5:01 am, Nick Pelly npe...@google.com wrote:
 On Mon, Jan 11, 2010 at 5:27 PM,AlexCorbia.co...@gmail.com wrote:
  Hi Nick,

  Thanks for your answer.

  What i am trying to do is to detect when a bluetooth headset device
  connect to the phone so my app can react to this event.

  is there an alternative?

 For the requirement you stated there is no public API option. But
 maybe you can explain what your app wants to do when a BT headset
 connects, and I might know a better option. For example ACL_CONNECTED
 will tell you when a low level ACL connection is established and is
 part of the public API.





 Alex

  On Jan 11, 6:17 am, Nick Pelly npe...@google.com wrote:
  On Mon, Jan 11, 2010 at 7:40 AM,AlexCorbia.co...@gmail.com wrote:
   HI everybody,

   im currently looking for the way that my app knows when the phone has
   being paired and connected to a bluetooth headset device.

   I read something about this intent, but not on the Reference
   documentation ofhttp://developer.android.com

   android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

   is this actually working, is it officially supported.

   I mean, can we just register a broadcastreceiver to handle this
   intent , check for the EXTRA_STATE string extra to see if it equals
   STATE_CONNECTED and be sure that the phone is now connected with a
   bluetooth headset device ???

   What about this BluetoothA2dpService class?? There is no official
   documentation about this, everything i found i from code snippets of
   the android OS source code.

   What do you guys think about this?

  It's not part of the official Android API. So it is very dangerous to
  use, since it can (and probably will) break in a future OTA. It might
  not work at all on some Android devices, since Android devices are
  only required to implement the official API.

  There is currently no way to determine if a Bluetooth device is
  connected to the built-in Bluetooth headset service through the
  official API.

  If you can explain what you are trying to do, I might be able to
  suggest a better alternative?

  Nick

  --
  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
-- 
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] android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

2010-01-10 Thread Alex Corbi
HI everybody,

im currently looking for the way that my app knows when the phone has
being paired and connected to a bluetooth headset device.

I read something about this intent, but not on the Reference
documentation of http://developer.android.com

android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

is this actually working, is it officially supported.

I mean, can we just register a broadcastreceiver to handle this
intent , check for the EXTRA_STATE string extra to see if it equals
STATE_CONNECTED and be sure that the phone is now connected with a
bluetooth headset device ???

What about this BluetoothA2dpService class?? There is no official
documentation about this, everything i found i from code snippets of
the android OS source code.

What do you guys think about this?

Greetings,

Alex.
-- 
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: Android 2.x - Lost the ability to route audio

2010-01-10 Thread Alex Corbi
Yep, i'm also interested in this...

Also how to detect when a bluetooth headset device is being paired and
connected with the phone.

Actually i started this conversation:

http://groups.google.com/group/android-developers/browse_thread/thread/a4dda4e7f905a383


On Dec 24 2009, 10:08 pm, Doug dougforp...@gmail.com wrote:
 This could be considered a bump, as my previous post (regarding audio
 on 1.6 never got a response - 
 seehttp://groups.google.com/group/android-developers/browse_thread/threa...
 ) never got a response.

 In Android 1.5 we had the ability to route audio to any of the
 available output devices - Speaker, Earpiece, WiredHeadset,Bluetooth
 A2DP.

 In Android 1.6 the Android team made things more difficult, but it was
 still possible (there were comments about a re-write of the
 Audio subsystem)

 In Android 2.0 the workarounds for 1.6 stopped working, and comments
 in the source/documentation indicated thou shalt call these alternate
 methods - the alternate methods didn't seem to work properly and only
 gave access to a subset of available devices.

 I have just downloaded the latest source and can now see why the new
 methods don't work properly for me - they themselves seem to have been
 deprecated and are just stubs that do nothing.  I also note that the
 documentation has also been updated to indicate these methods are no
 longer viable.

 So my question is this: Is there *any* way in Android 2.x for an
 application to request that audio be routed to a given audio sink.
 Specifically, if I want to route audio to Speaker OR Earpiece OR 
 WiredHeadset(if available) ORBluetoothA2DP (if available) -- can I do
 it?

 I'd be interested to hear if Google Voice still allows switching
 voicemail playback from Speaker to Earpiece on Android 2.x devices
 (the Verizon Droid for example).
-- 
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: android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

2010-01-10 Thread Alex Corbi
Hi Nick,

Thanks for your answer.

What i am trying to do is to detect when a bluetooth headset device
connect to the phone so my app can react to this event.

is there an alternative?

Alex

On Jan 11, 6:17 am, Nick Pelly npe...@google.com wrote:
 On Mon, Jan 11, 2010 at 7:40 AM, Alex Corbi a.co...@gmail.com wrote:
  HI everybody,

  im currently looking for the way that my app knows when the phone has
  being paired and connected to a bluetooth headset device.

  I read something about this intent, but not on the Reference
  documentation ofhttp://developer.android.com

  android.bluetooth.a2dp.intent.action.SINK_STATE_CHANGED

  is this actually working, is it officially supported.

  I mean, can we just register a broadcastreceiver to handle this
  intent , check for the EXTRA_STATE string extra to see if it equals
  STATE_CONNECTED and be sure that the phone is now connected with a
  bluetooth headset device ???

  What about this BluetoothA2dpService class?? There is no official
  documentation about this, everything i found i from code snippets of
  the android OS source code.

  What do you guys think about this?

 It's not part of the official Android API. So it is very dangerous to
 use, since it can (and probably will) break in a future OTA. It might
 not work at all on some Android devices, since Android devices are
 only required to implement the official API.

 There is currently no way to determine if a Bluetooth device is
 connected to the built-in Bluetooth headset service through the
 official API.

 If you can explain what you are trying to do, I might be able to
 suggest a better alternative?

 Nick
-- 
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] Protection Method to avoid an .apk being copied overall

2010-01-06 Thread Alex Corbi
Hi Developers,

First i explain you my situation:

I have just released my new App (Voice Alerts - more info:
http://49ers.es/corbi/voice-alerts), there is a demo and a full (paid)
version.

For promoting/publicity purposes i would like to send a copy of the
full version to a couple of people, so they get the fully functional
app without paying for it. My fear is that if i send them the .apk
without any protection means implemented, it could happen that they
can eventually upload the file to a server and made it available for
free overall.

How would you guys solve this situation?

I have 2 ideas runing on my head right know:

- is it possible to return the money to a user that buys the app
through the market, using google checkout? This solution should be
just great because i will not have to add extra lines on the code or
prepare an especial .apk for it. Just return the money but the app
stays in the phone and would get the updates and everything.

- is it possible to check programatically wich google acount (or other
mail account) is being user on a phone, so the app would be associated
with just one email account and will only work with that phone?

any other alternatives...

Greetings ,

Alex.
-- 
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: Dim Screen - Set to sleep programmatically

2010-01-02 Thread Alex Corbi
nobody?

can the power-management third party apps do this?

On Dec 24 2009, 1:23 am, Alex Corbi a.co...@gmail.com wrote:
 Hi there!!

 A little question about custom Power Management...

 Is it allow for my app todimthescreenprogrammatically??, the goal
 would be to send the phone sleeping when a
 Intent.ACTION_BATTERY_CHANGED event is handled by a BroadcastReceiver,
 just like its done automatically by the OS (if so configured) after x
 time of inactivity.

 Thanks above all.

 Alex.

-- 
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: Controlling the current MediaPlayer

2009-12-24 Thread Alex Corbi
Thanks for the tipp moneytoo, i will check that out.

Mark, is it allowed to use the method that moneytoo suggests?

is it at least possible to know whether some media is currently being
played? a isPlaying() method or something?

Thank you guys.

Alex.

On Dec 23, 3:26 pm, moneytoo m...@seznam.cz wrote:
 You can broadcast intents to control the Android/HTC media player.
 Check MediaPlaybackService.java source.

 On Dec 23, 1:43 pm, Alex Corbi a.co...@gmail.com wrote:



  Hi google devs,

  This should be easy, but i haven't found anything yet

  I want to get a reference to theMediaplayerrunning currently on the
  device, so my app can pause it, execute its code and then resume it
  again. The class that plays the music and the videos is of course
 MediaPlayerbut i don't want to create a new one, but to control the
  one its running when my app needs to do its job.

  Of course it should be possible that no song or video is currently
  being played so there should be a isplaying() method somewhere...

  Any clues how to make that?

  Thanks in advances..

  Alex

-- 
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] Controlling the current MediaPlayer

2009-12-23 Thread Alex Corbi
Hi google devs,

This should be easy, but i haven't found anything yet

I want to get a reference to the Mediaplayer running currently on the
device, so my app can pause it, execute its code and then resume it
again. The class that plays the music and the videos is of course
MediaPlayer but i don't want to create a new one, but to control the
one its running when my app needs to do its job.

Of course it should be possible that no song or video is currently
being played so there should be a isplaying() method somewhere...

Any clues how to make that?

Thanks in advances..

Alex

-- 
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] Dim Screen - Set to sleep programmatically

2009-12-23 Thread Alex Corbi
Hi there!!

A little question about custom Power Management...

Is it allow for my app to dim the screen programmatically??, the goal
would be to send the phone sleeping when a
Intent.ACTION_BATTERY_CHANGED event is handled by a BroadcastReceiver,
just like its done automatically by the OS (if so configured) after x
time of inactivity.

Thanks above all.

Alex.

-- 
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] Clickable Desktop Widget

2009-08-24 Thread Alex Corbi

Hi guys,

i'm implementing a simple Widget that toggles on/off a service on my
App, I've extended a AppWidgetProvider class and succesfully defined
the xml appwidget-provider file.

The question is, how can i register a OnClikListener so i know when
the user clicks the widget on the desktop (once its already placed on
it) the OnUpdated(), OnEnabled(), OnDisabled() events are being
correctly called, but i don't know how to register a OnClickListener
sinces there's no activity and therefore i cannot call findViewById().

How is it done for most of the toggle widgets? how have you guys
implemented it?

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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Clickable Desktop Widget

2009-08-24 Thread Alex Corbi

Thanks, i appreciatte the help.

On Aug 24, 4:27 pm, String sterling.ud...@googlemail.com wrote:
 On Aug 24, 1:05 pm, Alex Corbi a.co...@gmail.com wrote:

  The question is, how can i register a OnClikListener so i know when
  the user clicks the widget on the desktop

 You send it through the RemoteViews object. Here's my code:

         RemoteViews views = new RemoteViews(context.getPackageName(),
 R.layout.widget);
         views.setOnClickPendingIntent(R.id.click_target,
 PendingIntent.getActivity(
                         context,
                         0,
                         new Intent(context, MyActivity.class).setFlags
 (Intent.FLAG_ACTIVITY_NEW_TASK),
                         PendingIntent.FLAG_UPDATE_CURRENT));

 As you can see, mine opens a specific activity, but I believe you
 could fire any valid Intent.

 String
--~--~-~--~~~---~--~~
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] Accelerometer shake side-to-side detection issue

2009-08-02 Thread Alex Corbi

Hi everybody,

I'm developing an app and i need to detect when the user shakes the
phone from side to side , that means just along one axis (in this case
X) . That for i'm reading the values from the accelerometer, a bit of
code:

private final double THRESHOLD = 0.2;

@Override
public void onSensorChanged(SensorEvent event) {
if (series!=null){
if (event.values[0]  -THRESHOLD){
moving = LEFT;
}else if (event.values[0]  THRESHOLD){
moving = RIGHT;
}
}
}

I want to know when the user shakes the phone to the left and when to
the right, the problem is that my code does not detect shaking but
tilt, i have tested this code and it works when i tilt the phone to
left or to the right, but not when a shake it from side to side (no
matter the orientation of the phone).

¿do you guys know what i'm doing wrong? ¿how would you code it? i'm
testing it on a Samsung galaxy.

- i dont what to detect an arbitrary shake , i want to detect the
acceleration along the x axis, something in this direction:(from the
documentation)

When the device lies flat on a table and is pushed on its left side
toward the right, the x acceleration value is positive.

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
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---