fix crash when no Pebble was paired, change version to 0.1.0, build tweaks

master
Andreas Shimokawa 2015-03-11 12:40:59 +01:00
parent 6fa99082ab
commit 326e079068
4 changed files with 16 additions and 6 deletions

View File

@ -11,12 +11,12 @@ Features:
* Incoming calls notification and display (caller, phone number) * Incoming calls notification and display (caller, phone number)
* Outgoing call display * Outgoing call display
* Reject/Hangup Calls * Reject/hangup calls
* SMS notification (sender, body) * SMS notification (sender, body)
* K-9 Mail notification support (sender, subject, preview) * K-9 Mail notification support (sender, subject, preview)
* Support for generic notificaions (above filtered out) * Support for generic notificaions (above filtered out)
* Apollo Music Playback info (artist, album, track) * Apollo playback info (artist, album, track)
* Music Control: Play/Pause, Next Track, Previous Track * Music control: play/pause, next track, previous track
How to use: How to use:

View File

@ -4,12 +4,15 @@ android {
compileSdkVersion 21 compileSdkVersion 21
buildToolsVersion "21.1.2" buildToolsVersion "21.1.2"
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig { defaultConfig {
applicationId "nodomain.freeyourgadget.gadgetbridge" applicationId "nodomain.freeyourgadget.gadgetbridge"
minSdkVersion 19 minSdkVersion 19
targetSdkVersion 21 targetSdkVersion 21
versionCode 1 versionCode 1
versionName "1.0" versionName "0.1.0"
} }
buildTypes { buildTypes {
release { release {

View File

@ -170,8 +170,10 @@ public class BluetoothCommunicationService extends Service {
btDeviceAddress = device.getAddress(); btDeviceAddress = device.getAddress();
} }
} }
if (btDeviceAddress == null) {
if (mBtSocket == null || !mBtSocket.isConnected()) { Toast.makeText(this, "No supported device paired", Toast.LENGTH_SHORT).show();
}
else if (mBtSocket == null || !mBtSocket.isConnected()) {
// currently only one thread allowed // currently only one thread allowed
if (mBtSocketIoThread != null) { if (mBtSocketIoThread != null) {
mBtSocketIoThread.quit(); mBtSocketIoThread.quit();

View File

@ -17,3 +17,8 @@ allprojects {
jcenter() jcenter()
} }
} }
ext {
compileSdkVersion = 21
buildToolsVersion = "21.1.2"
}