Wednesday, May 21, 2014

Re: [android-developers] Re: Alarm Intent not triggered

Raymond,
Any suggestions for me?

Problem is alarm is set from my Activity, and the alarm is received only if Activity is currently running.  Otherwise it will not.

Regards,
   Sunil


On Fri, May 9, 2014 at 8:12 PM, Sunil K <sunilchintu2468@gmail.com> wrote:
No, made it work.  But now the real problem is alarm is raised only when my activity is running, otherwise it will not.  Currently trying to make my alarm activity as background service but no luck still.
Any suggestion?  


On Wed, Apr 23, 2014 at 10:57 PM, Raymond Rodgers <raymond@badlucksoft.com> wrote:
Is the alarm working while the screen is on, but it's failing when the screen is off? If so, you may need to implement a wakelock or partial wakelock for it to work properly.
 
On 04/19/2014 09:11 AM, Sunil.K wrote:
Tried all possibilities, but no SUCCESS.  Experts, please point my mistake I'm kind of stuck here :(

On Friday, 18 April 2014 18:16:30 UTC+5:30, Sunil.K wrote:
Hello,

I am developing an app related to alarm service and facing an issue of Intent not being called.
I have registered for event in manifest file:

  <receiver android:name="com.example.myfirstapp.EventTriggerManager" >
        </receiver>

And have implemented EventTriggerManager class extended from BroadcastReceiver:

public class EventTriggerManager extends BroadcastReceiver 
{
  @Override
  public void onReceive(Context context, Intent intent) 
  {
 System.out.println("Alarm raised");
 Toast.makeText(context, "Don't panik You have an alarm!!!!.", Toast.LENGTH_LONG).show();
}
}

Adding an alarm from the Activity class:
            Intent intent = new Intent(this, EventTriggerManager.class);
   PendingIntent pendingIntent = PendingIntent.getBroadcast(this.getApplicationContext(), 12345678, intent, 0);
   AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);
   alarmManager.set(AlarmManager.RTC_WAKEUP, totalTime, pendingIntent);

But alarm is not getting triggered when totalTime is reached in the system.

Note: totalTime is absolute time used.

Pls point my mistake why the expected output is not seen.

Regards,
   Sunil
--
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+unsubscribe@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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--   Raymond Rodgers  http://www.badlucksoft.com/  http://anevilgeni.us/  

--
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+unsubscribe@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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks & Regards
  **** Sunil *****



--
Thanks & Regards
  **** Sunil *****

--
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+unsubscribe@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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment