Skip to content

Commit 87c4fef

Browse files
committed
Merge pull request #27 from Shao-Feng/android_service
Start service by default
2 parents fec8143 + cbeca28 commit 87c4fef

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

android/src/testkit/stub/TestkitStub.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,11 @@
1616

1717
package testkit.stub;
1818

19-
import java.io.DataInputStream;
20-
import java.io.FileInputStream;
21-
import java.io.FileNotFoundException;
22-
import java.io.FileOutputStream;
23-
import java.io.IOException;
24-
import java.io.InputStream;
2519
import android.app.Activity;
2620
import android.content.Intent;
27-
import android.os.Build;
2821
import android.os.Bundle;
2922
import android.view.View;
3023
import android.widget.Button;
31-
import android.widget.TextView;
3224

3325
public class TestkitStub extends Activity implements View.OnClickListener {
3426
@Override
@@ -41,6 +33,10 @@ public void onCreate(Bundle savedInstanceState) {
4133

4234
startButton.setOnClickListener(this);
4335
stopButton.setOnClickListener(this);
36+
37+
Intent startIntent = new Intent(TestkitStub.this, TestkitStubService.class);
38+
startIntent.setAction(Constants.ACTION.STARTFOREGROUND_ACTION);
39+
startService(startIntent);
4440
}
4541

4642
@Override

0 commit comments

Comments
 (0)