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 [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
---
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 [email protected] <mailto:[email protected]>.
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 [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
--- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to