Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 25 additions & 15 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions .idea/runConfigurations.xml

This file was deleted.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:7.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -14,6 +15,7 @@ buildscript {

allprojects {
repositories {
google()
jcenter()
}
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Project-wide Gradle settings.

android.useAndroidX=true

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
29 changes: 6 additions & 23 deletions org.pepzer.mqttdroid.client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
compileSdkVersion 31
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
targetSdkVersion 30
versionCode 1
versionName "0.1"
}
Expand All @@ -27,28 +26,12 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
implementation 'androidx.appcompat:appcompat:1.4.1'

testImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
}

android.libraryVariants.all { variant ->
task("generate${variant.name}Javadoc", type: Javadoc) {
title = "$name $version API"
description "Generates Javadoc for $variant.name."
source = variant.javaCompile.source
ext.androidJar =
"${android.sdkDirectory}/platforms/${android.compileSdkVersion}/android.jar"
classpath = files(variant.javaCompile.classpath.files) + files(ext.androidJar)
options.links("http://docs.oracle.com/javase/7/docs/api/");
options.links("http://d.android.com/reference/");
exclude '**/BuildConfig.java'
exclude '**/R.java'
}
testImplementation 'junit:junit:4.12'
}

// Generate Sources Jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
import android.os.IBinder;
import android.os.Message;
import android.os.RemoteException;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;

import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;

import org.pepzer.mqttdroid.IMQTTDroidAuth;
import org.pepzer.mqttdroid.IMQTTDroidNet;
import org.pepzer.mqttdroid.IMQTTDroidNetCallback;
Expand All @@ -48,15 +49,15 @@ protected void onCreate(Bundle savedInstanceState) {
ArrayList<String> permissions = new ArrayList<>();

if (ContextCompat.checkSelfPermission(this,
Manifest.permission.BIND_AUTH)
"org.pepzer.mqttdroid.BIND_AUTH")
!= PackageManager.PERMISSION_GRANTED) {
permissions.add(Manifest.permission.BIND_AUTH);
permissions.add("org.pepzer.mqttdroid.BIND_AUTH");
}

if (ContextCompat.checkSelfPermission(this,
Manifest.permission.BIND_PROXY)
"org.pepzer.mqttdroid.BIND_PROXY")
!= PackageManager.PERMISSION_GRANTED) {
permissions.add(Manifest.permission.BIND_PROXY);
permissions.add("org.pepzer.mqttdroid.BIND_PROXY");
}

if (permissions.size() > 0) {
Expand Down Expand Up @@ -206,23 +207,22 @@ public boolean isSuccess() {

protected void doBindAuthService() {
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.BIND_AUTH)
"org.pepzer.mqttdroid.BIND_AUTH")
== PackageManager.PERMISSION_GRANTED) {
Intent i = new Intent();
i.setClassName("org.pepzer.mqttdroid", "org.pepzer.mqttdroid.AuthService");
bindService(i, authConnection, Context.BIND_AUTO_CREATE);
authIsBound = true;
authIsBound = bindService(i, authConnection, Context.BIND_ABOVE_CLIENT);
Log.i(TAG, "authIsBound = " + authIsBound);
}
}

protected void doBindProxyService() {
if (ContextCompat.checkSelfPermission(this,
Manifest.permission.BIND_PROXY)
"org.pepzer.mqttdroid.BIND_PROXY")
== PackageManager.PERMISSION_GRANTED) {
Intent i = new Intent();
i.setClassName("org.pepzer.mqttdroid", "org.pepzer.mqttdroid.ProxyService");
bindService(i, proxyConnection, Context.BIND_ABOVE_CLIENT);
proxyIsBound = true;
proxyIsBound = bindService(i, proxyConnection, Context.BIND_ABOVE_CLIENT);
}
}

Expand Down Expand Up @@ -457,6 +457,7 @@ public boolean subscribe(String topic, int qos) {
if (proxyIsBound && proxyService != null) {
try {
success = proxyService.subscribe(topic, qos);
Log.i(TAG, "subscribe result: " + success);
} catch (RemoteException e) {
e.printStackTrace();
}
Expand Down
20 changes: 9 additions & 11 deletions sample-app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "24.0.3"
compileSdkVersion 31
defaultConfig {
applicationId "org.pepzer.mqttdroid.democlient"
minSdkVersion 16
targetSdkVersion 25
targetSdkVersion 30
versionCode 1
versionName "0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
Expand All @@ -20,14 +19,13 @@ android {
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
compile (project(':org.pepzer.mqttdroid.client')){
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation (project(':org.pepzer.mqttdroid.client')){
transitive=true
}
testImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package org.pepzer.mqttdroid.democlient;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
Expand All @@ -15,6 +14,8 @@
import android.widget.TextView;
import android.widget.Toast;

import androidx.appcompat.widget.Toolbar;

import org.pepzer.mqttdroid.client.MqttMsgContainer;
import org.pepzer.mqttdroid.client.MqttDroidClientActivity;
import org.pepzer.mqttdroid.client.MqttDroidUtils;
Expand Down
Loading