<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Android Basics &#8211; Alarm Service</title>
	<atom:link href="http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/</link>
	<description>Tutorials, Tips and tricks, Tools for Android development</description>
	<lastBuildDate>Mon, 06 Sep 2010 06:39:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Garry</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-476</link>
		<dc:creator>Garry</dc:creator>
		<pubDate>Sat, 14 Aug 2010 03:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-476</guid>
		<description>Trying to figure out all the android stuff - brand new to it -- and having to build a simple alarm clock but can&#039;t find *any* source code for 2.01 -- can anyone point me to a simple example source code?</description>
		<content:encoded><![CDATA[<p>Trying to figure out all the android stuff &#8211; brand new to it &#8212; and having to build a simple alarm clock but can&#8217;t find *any* source code for 2.01 &#8212; can anyone point me to a simple example source code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richy</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-456</link>
		<dc:creator>Richy</dc:creator>
		<pubDate>Sun, 18 Jul 2010 12:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-456</guid>
		<description>Same question as Kevin asked. What entries i should put in manifest.xml to make this work.
Can somebody please tell me what should be the &#039;intentname&#039; which i have to specify in manifest.xml
While answering please remove the &#039;greater than&#039; and &#039;less than&#039; signs..</description>
		<content:encoded><![CDATA[<p>Same question as Kevin asked. What entries i should put in manifest.xml to make this work.<br />
Can somebody please tell me what should be the &#8216;intentname&#8217; which i have to specify in manifest.xml<br />
While answering please remove the &#8216;greater than&#8217; and &#8216;less than&#8217; signs..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richy</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-455</link>
		<dc:creator>Richy</dc:creator>
		<pubDate>Sun, 18 Jul 2010 11:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-455</guid>
		<description>Same question as Kevin asked. What entries i should put in manifest.xml to make this work.
Can somebody please tell me what should be the  which i have to specify in manifest.xml</description>
		<content:encoded><![CDATA[<p>Same question as Kevin asked. What entries i should put in manifest.xml to make this work.<br />
Can somebody please tell me what should be the  which i have to specify in manifest.xml</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mayur birari</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-417</link>
		<dc:creator>mayur birari</dc:creator>
		<pubDate>Fri, 21 May 2010 10:22:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-417</guid>
		<description>hi &lt;a href=&quot;#comment-415&quot; rel=&quot;nofollow&quot;&gt;@Kevin&lt;/a&gt; 
    You need to make sure BroadcastReceiver( AlarmReceiver) must be defined in the manifest.xml inside the application tag like this
 

		
		
                   
		
		
    </description>
		<content:encoded><![CDATA[<p>hi <a href="#comment-415" rel="nofollow">@Kevin</a><br />
    You need to make sure BroadcastReceiver( AlarmReceiver) must be defined in the manifest.xml inside the application tag like this</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kevin</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-415</link>
		<dc:creator>Kevin</dc:creator>
		<pubDate>Thu, 20 May 2010 00:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-415</guid>
		<description>Does something need to be specified in the manifest.xml file for this to work? I&#039;m trying everything I can think of, but I just can&#039;t seem to get this working. Thanks</description>
		<content:encoded><![CDATA[<p>Does something need to be specified in the manifest.xml file for this to work? I&#8217;m trying everything I can think of, but I just can&#8217;t seem to get this working. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: juan lee</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-414</link>
		<dc:creator>juan lee</dc:creator>
		<pubDate>Wed, 19 May 2010 21:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-414</guid>
		<description>I am new to android so please bear with me. 
1. After you set the alarm and kill the alarm clock( using taskiller) the alarm never goes off. why? I thought this was the idea behind intent and broadcast receivers. Also, can android kill the alarm because it require resources? is this possible?

3. I am currently writing a program handles the statues of the phone( rining, idle, in use, etc)
Again, if my program is killed by android memory management system, then It wouldn&#039;t work.
can someone explain to me how can i make sure my program would run when there is incoming call even after android has killed it?

thank you</description>
		<content:encoded><![CDATA[<p>I am new to android so please bear with me.<br />
1. After you set the alarm and kill the alarm clock( using taskiller) the alarm never goes off. why? I thought this was the idea behind intent and broadcast receivers. Also, can android kill the alarm because it require resources? is this possible?</p>
<p>3. I am currently writing a program handles the statues of the phone( rining, idle, in use, etc)<br />
Again, if my program is killed by android memory management system, then It wouldn&#8217;t work.<br />
can someone explain to me how can i make sure my program would run when there is incoming call even after android has killed it?</p>
<p>thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Archana</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-403</link>
		<dc:creator>Archana</dc:creator>
		<pubDate>Sun, 02 May 2010 15:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-403</guid>
		<description>Thanks a ton for this article!
Its simple, straight-forward and the best that i have read so far on Alarm!
You have made it so easy and understandable!</description>
		<content:encoded><![CDATA[<p>Thanks a ton for this article!<br />
Its simple, straight-forward and the best that i have read so far on Alarm!<br />
You have made it so easy and understandable!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anusha</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-397</link>
		<dc:creator>anusha</dc:creator>
		<pubDate>Tue, 20 Apr 2010 09:34:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-397</guid>
		<description>Thank you very much for the help</description>
		<content:encoded><![CDATA[<p>Thank you very much for the help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mayur Birari</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-396</link>
		<dc:creator>Mayur Birari</dc:creator>
		<pubDate>Tue, 20 Apr 2010 08:03:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-396</guid>
		<description>First add this code in your start.java class(Main Activity class)-

package com.wissen.alarm;

import android.app.Activity;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

public class Alarm extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
       
           Intent intent = new Intent(this, AlarmReceiver.class);
      
        PendingIntent pendingIntent = PendingIntent.getBroadcast(this,001000,intent,0);
       
        PendingIntent pendingIntent2 = PendingIntent.getBroadcast(this,002000,intent,0);
      
        PendingIntent pendingIntent3 = PendingIntent.getBroadcast(this,003000,intent,0);

        AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
        alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), pendingIntent);
        Toast.makeText(this, &quot;Alarm set 1&quot;, Toast.LENGTH_LONG).show();
    
        alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), pendingIntent2);
        Toast.makeText(this, &quot;Alarm set 2&quot;, Toast.LENGTH_LONG).show();
       
        alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), pendingIntent3);
        Toast.makeText(this, &quot;Alarm set 3&quot;, Toast.LENGTH_LONG).show();
    }  
}

after this make sure that ,the BroadcastReceiver( AlarmReceiver) must be defined in the manifest.xml inside the application tag like this


        
        
                  
        
        


to notify the multiple Alarms, your AlarmReceiver should be like this-

package com.wissen.alarm;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class AlarmReceiver extends BroadcastReceiver {

    static int count=1;
    @Override
    public void onReceive(Context context, Intent intent) {
        Toast.makeText(context, &quot;Alarm worked -&quot;+count, Toast.LENGTH_LONG).show();
        count++;
    }
}</description>
		<content:encoded><![CDATA[<p>First add this code in your start.java class(Main Activity class)-</p>
<p>package com.wissen.alarm;</p>
<p>import android.app.Activity;<br />
import android.app.AlarmManager;<br />
import android.app.PendingIntent;<br />
import android.content.Intent;<br />
import android.os.Bundle;<br />
import android.widget.Toast;</p>
<p>public class Alarm extends Activity {<br />
    /** Called when the activity is first created. */<br />
    @Override<br />
    public void onCreate(Bundle savedInstanceState) {<br />
        super.onCreate(savedInstanceState);<br />
        setContentView(R.layout.main);</p>
<p>           Intent intent = new Intent(this, AlarmReceiver.class);</p>
<p>        PendingIntent pendingIntent = PendingIntent.getBroadcast(this,001000,intent,0);</p>
<p>        PendingIntent pendingIntent2 = PendingIntent.getBroadcast(this,002000,intent,0);</p>
<p>        PendingIntent pendingIntent3 = PendingIntent.getBroadcast(this,003000,intent,0);</p>
<p>        AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);<br />
        alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), pendingIntent);<br />
        Toast.makeText(this, &#8220;Alarm set 1&#8243;, Toast.LENGTH_LONG).show();</p>
<p>        alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), pendingIntent2);<br />
        Toast.makeText(this, &#8220;Alarm set 2&#8243;, Toast.LENGTH_LONG).show();</p>
<p>        alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + (5 * 1000), pendingIntent3);<br />
        Toast.makeText(this, &#8220;Alarm set 3&#8243;, Toast.LENGTH_LONG).show();<br />
    }<br />
}</p>
<p>after this make sure that ,the BroadcastReceiver( AlarmReceiver) must be defined in the manifest.xml inside the application tag like this</p>
<p>to notify the multiple Alarms, your AlarmReceiver should be like this-</p>
<p>package com.wissen.alarm;</p>
<p>import android.content.BroadcastReceiver;<br />
import android.content.Context;<br />
import android.content.Intent;<br />
import android.widget.Toast;</p>
<p>public class AlarmReceiver extends BroadcastReceiver {</p>
<p>    static int count=1;<br />
    @Override<br />
    public void onReceive(Context context, Intent intent) {<br />
        Toast.makeText(context, &#8220;Alarm worked -&#8221;+count, Toast.LENGTH_LONG).show();<br />
        count++;<br />
    }<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anusha</title>
		<link>http://www.androidcompetencycenter.com/2009/02/android-basics-alarm-service/comment-page-1/#comment-394</link>
		<dc:creator>anusha</dc:creator>
		<pubDate>Mon, 19 Apr 2010 11:15:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.androidcompetencycenter.com/?p=362#comment-394</guid>
		<description>how can i set more than one alarm and listout those alarms</description>
		<content:encoded><![CDATA[<p>how can i set more than one alarm and listout those alarms</p>
]]></content:encoded>
	</item>
</channel>
</rss>
