Hello fellow Android developers,
I have an application on the market to control ringer modes. You can
find a detailed explanation on the market at
https://market.android.com/details?id=com.studiolfp.ringlockpro to
help make sense of what I'm about to ask.
I've run into a strange issue from a customer that I can't quite
resolve, so I figured I'd see if anyone has run into this issue
before.
The customer has reported to me that when using the Event Timer
functionality to put the phone into vibrate mode, nothing will vibrate
even though the phone is confirmed to be in vibrate mode. The weird
part is that when he uses the widget to put the phone in vibrate mode,
everything does vibrate and works fine. I have checked with him
multiple times and confirmed all the phone settings are right. Here
are the details:
Phone: Droid Bionic, Android 2.3.4
Vibrate Setting: Always
Code for switching to vibrate from the widget:
AudioManager auMgr =
(AudioManager)context.getSystemService(Context.AUDIO_SERVICE);
auMgr.setRingerMode( iMode );
Code for switching to vibrate from the Event Timer (Dialog -> Function
-> Service):
In the selector dialog...
AudioManager auMgr =
(AudioManager)TimerSelector.this.getSystemService(Context.AUDIO_SERVICE);
auMgr.setRingerMode( thTimer.iMode );
RingLock.changeService( TimerSelector.this,
MainService.SERVICE_OPTION_FOREGROUND );
Function to change the service...
public static void changeService( Context context, int iOption )
{
Intent iService = new Intent( context, MainService.class );
iService.putExtra( MainService.BUNDLE_SERVICE_OPTION, iOption );
context.startService( iService );
}
The services onStartCommand it would jump to...
Intent iNotify = new
Intent( "com.studiolfp.ringlockpro.CANCEL_TIMER" );
PendingIntent piNotify = PendingIntent.getBroadcast( this, 1,
iNotify,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_CANCEL_CURRENT
);
Notification nNotify = new Notification();
nNotify.when = System.currentTimeMillis();
nNotify.tickerText = "RingLock Pro Event Timer Active";
nNotify.icon = R.drawable.notify;
nNotify.setLatestEventInfo( this, "RingLock Pro Event Timer",
"Expires: " + tExpires.format( "%a, %b %e at %I:%M%P" ),
piNotify );
startForeground( 1, nNotify );
And there it is in vibrate mode and has a timer service running with a
notification icon to allow the user to cancel the timer.
As you can see, I use the exact same calls to put the phone in vibrate
mode in both cases, but the report from the customer is that it does
not vibrate when using the Event Timer. The interesting part of all of
this is that I have tested this on 3 other pieces of Bionic hardware
and I cannot reproduce the problem. The customer has confirmed that
the vibrate function is working properly at all other times and in
other applications.
Anyone run into any settings or applications that would cause it to
stop vibrating only when a foreground service would be activated at
the same time?
Any help would be appreciated.
--
Steven
Studio LFP
http://www.studio-lfp.com
http://www.studio-lfp.com/rlp-ds.php (RingLock Pro Information)
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
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