Skip to content

Commit

Permalink
Add support of PX5 platform
Browse files Browse the repository at this point in the history
  • Loading branch information
bezloginu committed Jun 19, 2017
1 parent 63b8bf8 commit a823f1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ public abstract class BluetoothServiceActivity extends Activity {
protected void onCreate(Bundle savedInstance) {
super.onCreate(savedInstance);

// PX3
Intent startBluetoothServiceIntent = new Intent();
startBluetoothServiceIntent.setComponent(new ComponentName("android.microntek.mtcser", "android.microntek.mtcser.BTSerialService"));

if(!bindService(startBluetoothServiceIntent, mServiceConnection, BIND_AUTO_CREATE)) {
Toast.makeText(this, this.getText(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG).show();
finish();
// PX5
startBluetoothServiceIntent.setComponent(new ComponentName("android.microntek.mtcser", "android.microntek.mtcser.BlueToothService"));
if(!bindService(startBluetoothServiceIntent, mServiceConnection, BIND_AUTO_CREATE)) {
Toast.makeText(this, this.getText(R.string.BluetoothNotAvailable), Toast.LENGTH_LONG).show();
finish();
}
}
}

Expand Down

0 comments on commit a823f1a

Please sign in to comment.