文件名称:BroadcastDemo
文件大小:2.55MB
文件格式:ZIP
更新时间:2018-12-06 07:02:46
Broadcast
AlarmManager am = (AlarmManager) this .getSystemService(Context.ALARM_SERVICE); // Action指向我们的BoxinReceiver Intent intent = new Intent(this, BoxinReceiver.class); PendingIntent pi = PendingIntent.getBroadcast(MainActivity.this, 0, intent, 0); // 开始时间 long firstime = SystemClock.elapsedRealtime(); // 60秒一个周期,不停的发送广播 // am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstime, // 60 * 1000, pi); // 这里改成了一秒 ,为了测试一下效果 am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstime, 1000, pi);
【文件预览】:
BroadcastDemo
----.project(849B)
----project.properties(651B)
----src()
--------com()
----AndroidManifest.xml(1KB)
----res()
--------drawable-ldpi()
--------drawable-hdpi()
--------values-v11()
--------menu()
--------drawable-mdpi()
--------layout()
--------drawable-xxhdpi()
--------drawable-xhdpi()
--------values-w820dp()
--------values()
--------values-v14()
----.settings()
--------org.eclipse.jdt.core.prefs(177B)
----assets()
----gen()
--------com()
--------android()
----libs()
--------android-support-v4.jar(633KB)
----.classpath(475B)
----proguard-project.txt(781B)
----ic_launcher-web.png(50KB)
----bin()
--------resources.ap_(388KB)
--------R.txt(30KB)
--------classes()
--------AndroidManifest.xml(1KB)
--------dexedLibs()
--------jarlist.cache(343B)
--------BroadcastDemo.apk(877KB)
--------res()
--------classes.dex(1.57MB)