Skip to content

Commit b7b2ee0

Browse files
committed
Update README.md
1 parent 1390cf2 commit b7b2ee0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ How to use
1010
----------
1111
Simply copy WorkerFragment.java into your project, then on your Activity's onCreate() do this:
1212

13-
this.workerFragment = WorkerFragment.getWorkerFragment(this.getSupportFragmentManager());
13+
this.workerFragment = WorkerFragment.getWorkerFragment(this);
1414

15-
If savedInstanceState == null, this is how your start your IntentService:
15+
If savedInstanceState == null, you start your IntentService to do some background work:
1616

1717
Intent exampleIntent = new Intent(this, ExampleService.class);
1818
exampleIntent.setAction(ExampleService.ACTION_GET_HELLO);
1919
this.workerFragment.putReceiver(exampleIntent); /* this sets the WorkerFragment as receiver */
2020
this.startService(exampleIntent);
2121

22-
Then you implement the WorkerFragment.WorkerFragmentReceiver interface in your Activity:
22+
Then you implement the WorkerFragment.WorkerFragmentReceiver interface in your Activity to handle the result:
2323

2424
@Override
2525
public void onReceiveResult(int resultCode, Bundle resultData) {
@@ -32,7 +32,7 @@ Then you implement the WorkerFragment.WorkerFragmentReceiver interface in your A
3232
break;
3333
}
3434

35-
Now in your service, sending your result is as simple as:
35+
Now in your IntentService, sending your result is as simple as:
3636

3737
Bundle result = new Bundle();
3838
result.putString(KEY_RESULT, "hello world!");

0 commit comments

Comments
 (0)