Skip to content

Commit ce59227

Browse files
committed
New Android Sample App First Pass
Signed-off-by: James Sutton <james.sutton@uk.ibm.com> Change-Id: I9c7945958bc0198e1b59ef5598f50f23ff9faef6
1 parent 461d6c5 commit ce59227

173 files changed

Lines changed: 5887 additions & 4559 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

org.eclipse.paho.android.service/org.eclipse.paho.android.sample/build.gradle

100755100644
Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,48 @@ apply plugin: 'android-sdk-manager'
22
apply plugin: 'com.android.application'
33

44
android {
5-
compileSdkVersion 21
6-
buildToolsVersion '21.1.2'
5+
compileSdkVersion 22
6+
buildToolsVersion "22.0.1"
77

88
defaultConfig {
9-
// min and target SDK is not set in Gradle to use the version defined in the android manifest
9+
applicationId "org.eclipse.paho.android.sample"
10+
minSdkVersion 22
11+
targetSdkVersion 22
12+
versionCode 1
13+
versionName "1.0"
1014
}
1115
buildTypes {
1216
release {
1317
minifyEnabled false
1418
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1519
}
1620
}
17-
1821
lintOptions {
1922
abortOnError false
2023
}
2124
}
2225

2326
repositories {
2427
maven {
25-
url "https://repo.eclipse.org/content/repositories/paho-releases/"
28+
url "https://repo.eclipse.org/content/repositories/paho-snapshots/"
2629
}
2730
}
2831

2932
dependencies {
30-
compile 'com.android.support:support-v4:22.2.1'
31-
compile (group: 'org.eclipse.paho', name: 'org.eclipse.paho.android.service', version: '1.0.2') {
33+
compile 'com.android.support:appcompat-v7:22+'
34+
compile('com.android.support:recyclerview-v7:22.2.+') {
3235
exclude module: 'support-v4'
3336
}
3437

38+
compile('org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.3-SNAPSHOT') {
39+
// exclude module: 'support-v4'
40+
}
41+
42+
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.3-SNAPSHOT') {
43+
exclude module: 'support-v4'
44+
}
3545
}
46+
47+
48+
49+

org.eclipse.paho.android.service/org.eclipse.paho.android.sample/org.eclipse.paho.android.sample.iml

100755100644
Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<module external.linked.project.id=":org.eclipse.paho.android.sample" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="org.eclipse.paho.android" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
2+
<module external.linked.project.id=":org.eclipse.paho.android.sample" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="org.eclipse.paho.android.service" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
33
<component name="FacetManager">
44
<facet type="android-gradle" name="Android-Gradle">
55
<configuration>
@@ -71,7 +71,8 @@
7171
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
7272
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" />
7373
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" />
74-
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars" />
74+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/jars" />
75+
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/22.2.1/jars" />
7576
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
7677
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
7778
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" />
@@ -85,15 +86,15 @@
8586
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
8687
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
8788
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
88-
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
89-
<excludeFolder url="file://$MODULE_DIR$/build/test-results" />
9089
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
9190
</content>
92-
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
91+
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
9392
<orderEntry type="sourceFolder" forTests="false" />
9493
<orderEntry type="library" exported="" name="support-v4-22.2.1" level="project" />
95-
<orderEntry type="library" exported="" name="org.eclipse.paho.client.mqttv3-1.0.2" level="project" />
94+
<orderEntry type="library" exported="" name="recyclerview-v7-22.2.1" level="project" />
95+
<orderEntry type="library" exported="" name="org.eclipse.paho.android.service-1.0.3-SNAPSHOT" level="project" />
9696
<orderEntry type="library" exported="" name="support-annotations-22.2.1" level="project" />
97-
<orderEntry type="library" exported="" name="org.eclipse.paho.android.service-1.0.2" level="project" />
97+
<orderEntry type="library" exported="" name="appcompat-v7-22.2.1" level="project" />
98+
<orderEntry type="library" exported="" name="org.eclipse.paho.client.mqttv3-1.0.3-SNAPSHOT" level="project" />
9899
</component>
99100
</module>

org.eclipse.paho.android.service/org.eclipse.paho.android.sample/proguard-rules.pro

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# By default, the flags in this file are appended to flags specified
3-
# in /home/james/Android/Sdk/tools/proguard/proguard-org.eclipse.paho.android.service.txt
3+
# in /home/james/Android/Sdk/tools/proguard/proguard-android.txt
44
# You can edit the include path and order by changing the proguardFiles
55
# directive in build.gradle.
66
#

org.eclipse.paho.android.service/org.eclipse.paho.android.sample/src/androidTest/java/org/eclipse/paho/android/ApplicationTest.java renamed to org.eclipse.paho.android.service/org.eclipse.paho.android.sample/src/androidTest/java/org/eclipse/paho/android/sample/ApplicationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.eclipse.paho.android;
1+
package org.eclipse.paho.android.sample;
22

33
import android.app.Application;
44
import android.test.ApplicationTestCase;
Lines changed: 13 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="org.eclipse.paho.android.sample"
4-
android:versionCode="1"
5-
android:versionName="1.0" >
3+
package="org.eclipse.paho.android.sample" >
64

7-
<uses-sdk
8-
android:minSdkVersion="11"
9-
android:targetSdkVersion="21" />
105

116
<!-- Permissions the Application Requires -->
127
<uses-permission android:name="android.permission.WAKE_LOCK" />
@@ -17,54 +12,35 @@
1712
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
1813
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
1914

15+
2016
<application
2117
android:allowBackup="true"
22-
android:icon="@drawable/ic_launcher"
18+
android:icon="@mipmap/ic_launcher"
2319
android:label="@string/app_name"
24-
android:theme="@style/AppTheme" >
20+
android:theme="@style/MaterialTheme" >
2521

2622
<!-- Mqtt Service -->
2723
<service android:name="org.eclipse.paho.android.service.MqttService" >
2824
</service>
2925

30-
<!-- Main Activity -->
31-
<activity android:name="org.eclipse.paho.android.sample.ClientConnections" >
26+
27+
<activity
28+
android:name=".activity.MainActivity"
29+
android:label="@string/app_name" >
3230
<intent-filter>
3331
<action android:name="android.intent.action.MAIN" />
3432

3533
<category android:name="android.intent.category.LAUNCHER" />
3634
</intent-filter>
37-
</activity>
38-
39-
<!-- New Connection Activity -->
40-
<activity
41-
android:name="org.eclipse.paho.android.sample.NewConnection"
42-
android:label="@string/title_activity_new_connection" >
43-
</activity>
4435

45-
<!-- Advanced Options Screen -->
46-
<activity
47-
android:name="org.eclipse.paho.android.sample.Advanced"
48-
android:label="@string/title_activity_advanced" >
4936
</activity>
50-
51-
<!-- Last Will Activity -->
5237
<activity
53-
android:name="org.eclipse.paho.android.sample.LastWill"
54-
android:label="@string/title_activity_last_will" >
38+
android:name=".activity.EditConnectionActivity"
39+
android:label="@string/action_add_connection" >
40+
<meta-data
41+
android:name="android.support.PARENT_ACTIVITY"
42+
android:value="org.eclipse.paho.android.sample.activity.MainActivity"/>
5543
</activity>
56-
57-
<!-- Connection Details Activity -->
58-
<activity
59-
android:name="org.eclipse.paho.android.sample.ConnectionDetails"
60-
android:label="@string/title_activity_connection_details" >
61-
</activity>
62-
63-
<service
64-
android:name="org.eclipse.paho.android.sample.AndroidMqttService"
65-
android:enabled="true"
66-
android:exported="true" >
67-
</service>
6844
</application>
6945

7046
</manifest>
26.3 KB
Loading

0 commit comments

Comments
 (0)