Skip to content

Commit fec8143

Browse files
committed
Merge pull request #26 from Shao-Feng/android_service
Android service
2 parents 7058f39 + 5869064 commit fec8143

File tree

18 files changed

+282
-59
lines changed

18 files changed

+282
-59
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ jdk: oraclejdk7
33

44
android:
55
components:
6-
- build-tools-19.1.0
7-
- android-19
6+
- build-tools-21.0.1
7+
- android-21
88
- extra
99

1010
before_script:

android/AndroidManifest.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,25 @@
66

77
<uses-permission android:name="android.permission.INTERNET" />
88

9-
<uses-sdk android:minSdkVersion="4" />
9+
<uses-sdk android:minSdkVersion="7" />
1010

1111
<application
12-
android:debuggable="false"
13-
android:theme="@android:style/Theme"
1412
android:label="@string/app_name" >
1513
<activity
1614
android:name=".TestkitStub"
17-
android:label="@string/app_name" >
15+
android:label="@string/app_name"
16+
android:launchMode="singleTask" >
1817
<intent-filter>
1918
<action android:name="android.intent.action.MAIN" />
2019

2120
<category android:name="android.intent.category.LAUNCHER" />
2221
</intent-filter>
2322
</activity>
23+
<service
24+
android:name=".TestkitStubService"
25+
android:enabled="true"
26+
android:exported="true" >
27+
</service>
2428
</application>
2529

26-
</manifest>
30+
</manifest>

android/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
}
55

66
dependencies {
7-
classpath 'com.android.tools.build:gradle:1.1.3'
7+
classpath 'com.android.tools.build:gradle:1.3.0'
88
}
99
}
1010

@@ -23,8 +23,8 @@ android {
2323
assets.srcDirs = ['assets']
2424
}
2525
}
26-
compileSdkVersion 19
27-
buildToolsVersion "19.1.0"
26+
compileSdkVersion 21
27+
buildToolsVersion "21.0.1"
2828

2929
if (multiarch) {
3030
productFlavors {
@@ -55,3 +55,7 @@ android {
5555
abortOnError false
5656
}
5757
}
58+
59+
dependencies {
60+
compile 'com.android.support:appcompat-v7:22.1.1'
61+
}

android/gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#systemProp.http.proxyHost=child-prc.intel.com
2+
#systemProp.http.proxyPort=913
3+
#systemProp.https.proxyHost=child-prc.intel.com
4+
#systemProp.https.proxyPort=913
5+
android.useDeprecatedNdk=true
7.48 KB
Loading
3.69 KB
Loading
12.2 KB
Loading
24.2 KB
Loading
7.48 KB
Loading
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
4+
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
5+
android:paddingRight="@dimen/activity_horizontal_margin"
6+
android:paddingTop="@dimen/activity_vertical_margin"
7+
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".TestkitStub">
8+
9+
10+
<Button
11+
android:layout_width="wrap_content"
12+
android:layout_height="wrap_content"
13+
android:text="Start Service"
14+
android:id="@+id/start_button"
15+
android:layout_alignParentStart="true" />
16+
17+
<Button
18+
android:layout_width="wrap_content"
19+
android:layout_height="wrap_content"
20+
android:text="Stop Service"
21+
android:id="@+id/stop_button"
22+
android:layout_alignTop="@+id/start_button"
23+
android:layout_alignParentEnd="true" />
24+
25+
<TextView
26+
android:layout_width="wrap_content"
27+
android:layout_height="wrap_content"
28+
android:text="Once stub service is launched, it will work on port: 8000."
29+
android:id="@+id/textView"
30+
android:layout_below="@+id/start_button"
31+
android:layout_alignParentStart="true"
32+
android:layout_alignParentBottom="true"
33+
android:layout_alignEnd="@+id/stop_button" />
34+
35+
</RelativeLayout>

0 commit comments

Comments
 (0)