Reputation: 1425
In my project I am using AlarmClock which sets alarm at certain time. Since I didn't want to display the system's default clock post setting the alarm I used AlarmClock.EXTRA_SKIP_UI
but despite this after changing activity or quitting app following weird animation occurs.
To clear things up this animation is not animation of quitting/changing my activities. Moreover I tested this function in isolation and I am sure that these lines of code make that happen.
-------AlarmClock method-------
private void alarmClock(int hour, int minute) {
Intent i = new Intent(AlarmClock.ACTION_SET_ALARM);
i.putExtra(AlarmClock.EXTRA_SKIP_UI, true);
i.putExtra(AlarmClock.EXTRA_HOUR, hour);
i.putExtra(AlarmClock.EXTRA_MINUTES, minute);
i.putExtra(AlarmClock.EXTRA_DAYS, Calendar.THURSDAY);
i.putExtra(AlarmClock.EXTRA_MESSAGE, "Time for taking morning medicine!");
startActivity(i);
}
In AndroidManifest
I included following line
<uses-permission android:name="com.android.alarm.permission.SET_ALARM"/>
My first thought was that despite of disabling UI with AlarmClock.EXTRA_SKIP_UI
I still need to disable animation while using intent with overridePendingTransition(0, 0)
but still it didn't solve my problem.
Upvotes: 0
Views: 151
Reputation: 27236
This is going to be a wild guess. But it may be that your EXTRA_SKIP_UI is being ignored according to the documentation:
(emphasis mine)
This action requests an alarm to be set for a given time of day. If no time of day is specified, an implementation should start an activity that is capable of setting an alarm (EXTRA_SKIP_UI is ignored in this case).
If a time of day is specified, and EXTRA_SKIP_UI is true, and the alarm is not repeating, the implementation should remove this alarm after it has been dismissed.
Can you double check that you're not falling into these cases?
Upvotes: 0