Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api34 #367

Merged
merged 2 commits into from
May 10, 2024
Merged

api34 #367

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
4 changes: 2 additions & 2 deletions IOIOLibAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
namespace 'ioio.lib'
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34
}
}

Expand Down
4 changes: 2 additions & 2 deletions IOIOLibAndroidAccessory/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
namespace 'ioio.lib.accessory'
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import java.io.OutputStream;
import java.util.Collection;

import android.annotation.SuppressLint;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
Expand Down Expand Up @@ -267,9 +268,16 @@ private boolean tryOpen() {
}
}

@SuppressLint("UnspecifiedRegisterReceiverFlag")
private void registerReceiver() {
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
activity_.registerReceiver(this, filter);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
activity_.registerReceiver(this, filter, Context.RECEIVER_NOT_EXPORTED);
} else
activity_.registerReceiver(this, filter);
} else
activity_.registerReceiver(this, filter);
}

private void unregisterReceiver() {
Expand Down
4 changes: 2 additions & 2 deletions IOIOLibAndroidBluetooth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
namespace 'ioio.lib.bluetooth'
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34
}
}

Expand Down
4 changes: 2 additions & 2 deletions IOIOLibAndroidDevice/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
namespace 'ioio.lib.android.device'
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.util.Collection;
import java.util.HashMap;

import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
Expand Down Expand Up @@ -484,11 +485,18 @@ private void checkPermission() {
}
}

@SuppressLint("UnspecifiedRegisterReceiverFlag")
private void registerReceiver() {
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
activity_.registerReceiver(this, filter);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
activity_.registerReceiver(this, filter, Context.RECEIVER_NOT_EXPORTED);
} else
activity_.registerReceiver(this, filter);
} else
activity_.registerReceiver(this, filter);
}

private void unregisterReceiver() {
Expand Down
4 changes: 2 additions & 2 deletions applications/HelloIOIO/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {

defaultConfig {
minSdkVersion 21
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/HelloIOIOService/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ android {
namespace 'ioio.examples.hello_service'
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/HolidayIOIO/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
namespace "ioio.examples.holiday"
defaultConfig {
minSdkVersion 21
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/IOIOConnectionTesterAndroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ android {
namespace "ioio.connection_tester"
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/IOIOManager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
namespace "ioio.manager"
defaultConfig {
minSdkVersion 21
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/IOIOSimpleApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
namespace "ioio.examples.simple"
defaultConfig {
minSdkVersion 21
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/IOIOTestBed/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ android {
namespace "ioio.test_bed"
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/IOIOTortureTest/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ android {
namespace "ioio.tests.torture"
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
4 changes: 2 additions & 2 deletions applications/ShoeBot/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ android {
namespace "ioio.applications.shoebot"
defaultConfig {
minSdkVersion 14
compileSdk 33
targetSdkVersion 33
compileSdk 34
targetSdkVersion 34

versionCode getGitCommitCount()
versionName getTag()
Expand Down
Loading