131 Commits

Author SHA1 Message Date
Hannes Achleitner
00718c94ff remove pointless .gitignore files
signing

Signed-off-by: Hannes Achleitner <hannes.software@gmx.at>
2020-04-05 07:10:01 +02:00
James Sutton
b5d5e5ef91 Revert "Move from minSDK 9 to min 14 (#245)" (#246)
This reverts commit 2cfc0e6c04b79670c24f9b1fb0e4444b6e0b740b.
2017-10-04 16:24:35 +01:00
Paul Blundell
2cfc0e6c04 Move from minSDK 9 to min 14 (#245)
- Upgrade to latest gradle build tools (3.0.0)
 - Remove unused code, and debug cradle code
 - Compile against latest Android (26)
 - Using latest build tools (26.0.0)
 - Use latest support library (26.1.0)
 - Add google maven repo
 - Use latest gradle version (4.1)
 - Target latest version of Android in samples (26)
 - Remove dependency on libs folder - unnecessary
 - Remove release flavours for samples (never used)

The example and sample have to depend on the compile project dependency for now, until a new release is done that includes the manifest merging.

Signed-off-by: Blundell <paul@novoda.com>
2017-10-04 16:22:10 +01:00
James Sutton
47592cdf01 Issue #169 - Adding null check on mqttService close, updating gradle version (#171)
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2017-01-24 11:32:35 +00:00
James Sutton
66eea5049f Null check on Pending Intent In AlarmPingSender 2016-12-08 09:04:52 +00:00
Mike Tran
6579bf4a8a Clear connecting flag when exception occured on connect (#147)
Signed-off-by: miketran78727 <miketran@us.ibm.com>
2016-11-08 13:45:16 +00:00
James Sutton
83bf8580d6 Commenting out suspected unnecessary permission - Issue #98 (#140)
* Issue #98 - Commenting out READ_PHONE_STATE

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-13 15:37:11 +01:00
James Sutton
ad1ea94d51 Removing buggy EXTRA_ALARM_COUNT call and useless log statement (#139)
* Removing ALARM_EXTRA_COUNT code as it was just being used for a non essential log message

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-13 11:30:43 +01:00
James Sutton
3c87e55625 Issue #126 - Triggering reconnect when device network state changes. (#135)
* Adding a further fix for android automatic reconnect

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-12 16:04:05 +01:00
James Sutton
b2c77660cf Lots of small fixes and linter improvements to the sample and example projects (#134)
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-12 11:39:03 +01:00
James Sutton
a8be502219 Merge branch 'develop' into pr/132
# Conflicts:
#	build.gradle
#	org.eclipse.paho.android.service/build.gradle
2016-10-10 15:29:27 +01:00
James Sutton
fef8373b92
Fixing Build tools version
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-10 14:39:46 +01:00
James Sutton
70521e12ba Removing dependency on sdk-manager-plugin (#128)
* Updating SSL Certs & following linter advice

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Undoing accidentially committed comment in build.gradle

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Removing dependency on sdk-manager-plugin

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Updating Gradle Wrapper

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-07 12:55:15 +01:00
James Sutton
88bbc60505
Removing dependency on sdk-manager-plugin
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-07 09:52:24 +01:00
James Sutton
daa0c6dad7 Undoing accidentially committed comment in build.gradle
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-06 11:43:53 +01:00
James Sutton
a4237eb383 Updating SSL Certs & following linter advice
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-10-06 11:43:53 +01:00
James Sutton
dfea50a717 Merge branch 'fix_alarm_ping_sender' of https://github.com/binarybucks/paho.mqtt.android into binarybucks-fix_alarm_ping_sender 2016-09-05 09:53:39 +01:00
Alexander Rust
adffd9391c fix cancel() called with a null PendingIntent
In case no connection can be established, AlarmPingSender stop method will be called when it has not been started yet. `java.lang.NullPointerException: cancel() called with a null PendingIntent` will be thrown as the pending intent has not been setup yet.
2016-08-02 07:49:05 +02:00
James Sutton
d827ef5538
Workaround for Issue #101
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-07-28 08:46:56 +01:00
James Sutton
b1f398e7a0 Bugs and Enhancement fixes (#91)
* Making sure that the service is build as a full project

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Changing build to ensure that service is built first

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Moving Lib copy to after clean

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Resolving issue #15 by adding support for Motorola Phones

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Updating Readme

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Removing build badge

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Adding Subscribe calls with IMqttMessageListener

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Adding Travis-ci build badge to readme

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-05-31 15:19:32 +01:00
James Sutton
2a3662a2d9 Resolving Issue #15 & other fixes (#85)
* Making sure that the service is build as a full project

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Changing build to ensure that service is built first

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Moving Lib copy to after clean

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Resolving issue #15 by adding support for Motorola Phones

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-05-19 09:44:50 +01:00
James Sutton
6e76d1f88c Making ParcelableMqttMessage public again
As discussed in Issue #205, as MqttMessage is public, there shouldn't be any reason for it to not be public too.
2016-05-10 10:46:23 +01:00
James Sutton
fe89528df5 More tweaks to the Android Service Build Process (#78)
* Making sure that the service is build as a full project

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Changing build to ensure that service is built first

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Moving Lib copy to after clean

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-22 10:13:03 +01:00
James Sutton
07f1b41bb7 Separating the service out in the project (#76)
* Making sure that the service is build as a full project

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Changing build to ensure that service is built first

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-21 13:16:10 +01:00
James Sutton
2b09786bda
Fixing Jar packaging & dependency issues
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-21 09:21:56 +01:00
James Sutton
badbbbb0eb
Making sure that the AAR is renamed once assemble is complete
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-20 14:21:06 +01:00
James Sutton
2ea4c56280 Merge pull request #73 from jpwsutton/master
Moving Maven repositories into publishing in build.gradle
2016-04-20 11:50:10 +01:00
James Sutton
e72493cf09
Moving Maven repositories into publishing in build.gradle
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-20 11:48:55 +01:00
James Sutton
77d6956ac1 Fixing Android Build situation. (#70)
Enabling Automatic Reconnect for Android client

Also Adding Example code for a very basic pub sub app that uses
Automatic Reconnect and offline buffering as well as a good example.

Fixed Build on Hudson

Added Build config for travis-ci

Fixed SSL tests to work with new iot.eclipse.org Certificate

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-20 09:55:05 +01:00
James Sutton
bb810eae53 Checking that a token is instanceOf IMqttDeliveryToken before casting it (#71)
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-13 16:01:52 +01:00
James Sutton
59c2bdab72 Automatic reconnect & Offline Buffering (#68)
* Enabling Automatic Reconnect for Android client

Also Adding Example code for a very basic pub sub app that uses
Automatic Reconnect and offline buffering as well as a good example.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>

* Tidying up example and Service code

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-08 11:15:19 +01:00
James Sutton
2f4d739bb2 Improving Gradle build to generate AAR file and fix internal dependency issues
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-04-05 10:48:46 +01:00
Nishant Srivastava
e7e35fa4f3 (*) fixed issue with AndroidManifest.xml 2016-03-09 23:40:50 +05:30
Nishant Srivastava
414db5d9cb (*) updated gitignore, project files, android gradle plugin, refactored manifest files
(+) added gradle wrapper, root ext variables to manage all values in one place

Signed-off-by: Nishant Srivastava <nisrulz@gmail.com>
2016-03-02 22:59:40 +05:30
James Sutton
f26b93a36c Issue #169: Added check to make sure that we have the wake lock before tying to release it
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2016-02-18 14:04:32 +00:00
James Sutton
29277f9f2f Bug: 476863 - Android Service is limited to SSL 3.0
I've set the SSL/TLS version to TLSv1. This is an immediate improvement over the very insecure SSLv1 that was previously allowed.
This should allow TLSv1 TLSV1.1 and TLSv1.2
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-11-26 15:11:17 +00:00
Kevin Cernekee
c5a385f87c Bug: 480134 - Wakelock not released in AlarmPingSender
Setting up callbacks after initiating the background ping can cause
a race condition, in which the operation completes before the callbacks
are set.  In this case, onSuccess() or onFailure() will not run, and
the wakelock will never be released.

To prevent this, specify a IMqttActionListener when creating the token.

Change-Id: I25f898e9558d16b61e9102adcf76fe7f2335ea2f
Signed-off-by: Kevin Cernekee <cernekee@google.com>
2015-11-13 11:37:24 -08:00
James Sutton
2e8a74c7e0 Bug: 474722 - Migrating Android Service to gradle
Android Service Jar contained another JAR containing the classes.
This was a mistake in the build.gradle build script in the order
in which it was preparing the compiled classes into the artifact.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-16 09:32:54 +01:00
James Sutton
26e5d208c8 Bug: 474722 - Including Eclipse Maven repository publishing details
Removing android-service-parent from pom

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-14 14:46:13 +01:00
James Sutton
c58987b542 Bug: 474722 - Including Eclipse Maven repository publishing details
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
Change-Id: Iea2b8f468a3b473f7aafe4079c20baa95a313b81
2015-09-14 11:35:04 +01:00
James Sutton
5275765c0b Bug: 474722 - Updating Service build.gradle to generate source and javadoc jars as well as preparation for maven publish
Also adding mavenCentral as a repository.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-07 15:47:13 +01:00
James Sutton
8785111104 iot.eclipse.org TLS is now available, adding iot.eclipse.org certificate to test.bks allowing SSL tests to pass.
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-04 11:28:38 +01:00
James Sutton
56cb1fbd28 Bug: 467378 - Char escape in DatabaseMessageStore
Adding a missed "=?" in SQLite query for getArrivedRowCount

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-04 11:02:03 +01:00
James Sutton
0cbb916896 Bug: 474722 - Adding android-sdk-manager plugin to gradle build.
Allows builds to be run without having to download and prepare the android sdk first

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-03 13:29:12 +01:00
James Sutton
4c021bc15b Bug: 467378 - Char escape in DatabaseMessageStore
The existing SQLite statements were constructed in such a way that the client ID could inject SQL into the statement.
I have modified them to be proper prepared statements thus allowing safe usage of ' in client IDs.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-01 15:23:39 +01:00
James Sutton
c34f13c2d8 Bug: 470019 - startService(serviceStartIntent) called Twice
Removing unnecessary second call to myContext.startService(serviceStartIntent)

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-09-01 11:31:41 +01:00
James Sutton
00cfa5319c Fix Bug 462619 - Change was reverted by accident. Putting back in.
Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
Change-Id: Ibadc46d43706be0ddb1dc588153f666cee2bc231
2015-09-01 05:33:00 -04:00
James Sutton
d6de962d11 Bug 469723 - AlarmPingSender causes timeout on Android API >= 19
When running on Android API 19 and above, use setExact when setting the next Ping Alarm.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-08-27 12:47:46 +01:00
James Sutton
2d5d689ac3 Bug: 474722 - Migrate Android Service Project to Android Studio / Gradle
Migrated Android Service to Gradle / Android Studio.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
2015-08-26 15:50:58 +01:00
James Sutton
ea42792dcc Bug: 473775 - Occasional NullPointerException in library when network connection changes
Moved the Network info into a temproary variable.

Signed-off-by: James Sutton <james.sutton@uk.ibm.com>
Change-Id: Ia41a4f560a7cba345f704eebb47e623d013d9b7a
2015-08-26 13:55:25 +01:00