Permalink
Browse files

finally got markdown behaving...

  • Loading branch information...
commonsguy committed Nov 18, 2011
1 parent f590134 commit 78c0de157ecb4e6b557db34bd2e98d94b24a9860
Showing with 9 additions and 9 deletions.
  1. +9 −9 README.markdown
View
@@ -66,10 +66,10 @@ Alarm Usage
If you want to slightly simplify your use of `WakefulIntentService`
in conjunction with `AlarmManager`, you can do the following:
- 1. Implement your `WakefulIntentService` and `doWakefulWork()`
+First, implement your `WakefulIntentService` and `doWakefulWork()`
as described above.
- 2. Create a class implementing the `WakefulIntentService.AlarmListener`
+Next, create a class implementing the `WakefulIntentService.AlarmListener`
interface. This class needs to have a no-argument public constructor
in addition to the interface method implementations. One method
is `scheduleAlarms()`, where you are passed in an `AlarmManager`,
@@ -79,15 +79,15 @@ your alarms using the supplied `PendingIntent`. You also implement
you call `sendWakefulWork()` upon your `WakefulIntentService`
implementation.
- 3. Create an XML metadata file where you identify the class
+Then, create an XML metadata file where you identify the class
that implements `WakefulIntentService.AlarmListener` from the
previous step, akin to:
- <WakefulIntentService
- listener="com.commonsware.cwac.wakeful.demo.AppListener"
- />
+ <WakefulIntentService
+ listener="com.commonsware.cwac.wakeful.demo.AppListener"
+ />
- 4. Register `com.commonsware.cwac.wakeful.AlarmReceiver`
+Next, register `com.commonsware.cwac.wakeful.AlarmReceiver`
as a `<receiver>` in your manifest, set to respond to
`ACTION_BOOT_COMPLETED` broadcasts, and with a `com.commonsware.cwac.wakeful`
`<meta-data>` element pointing to the XML resource from
@@ -103,9 +103,9 @@ the previous step, akin to:
android:resource="@xml/wakeful"/>
</receiver>
- 5. Add the `RECEIVE_BOOT_COMPLETED` permission to your manifest.
+Also, add the `RECEIVE_BOOT_COMPLETED` permission to your manifest.
- 6. When you wish to manually set up the alarms (e.g., on
+Finally, when you wish to manually set up the alarms (e.g., on
first run of your app), create an instance of your `AlarmListener`
and call `scheduleAlarms()` on the `WakefulIntentService`
class, passing in the `AlarmListener` and a `Context` (e.g.,

0 comments on commit 78c0de1

Please sign in to comment.