Skip to content

Commit

Permalink
Merge branch 'hotfix/android_m_ble_scanning'
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantine Mars committed Jun 16, 2016
2 parents 68a0397 + f9b916c commit 6a55c5b
Show file tree
Hide file tree
Showing 33 changed files with 1,436 additions and 434 deletions.
28 changes: 21 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'

android {
compileSdkVersion 18
buildToolsVersion "21.1.2"
compileSdkVersion 24
buildToolsVersion "24.0.0"

defaultConfig {
applicationId "com.dataart.btle_android"
minSdkVersion 18
targetSdkVersion 21
targetSdkVersion 24
versionCode 2
versionName "2.0"

multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
Expand All @@ -18,15 +24,23 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
useLibrary 'org.apache.http.legacy'
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.jakewharton.timber:timber:2.7.1'
provided "org.projectlombok:lombok:1.12.6"
compile 'commons-codec:commons-codec:1.5'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.google.guava:guava:19.0'

compile 'com.android.support:multidex:1.0.1'
}

This file was deleted.

5 changes: 4 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.INTERNET" />

<!--Location access is necessary for BLE devices discovery under Android M-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
android:name=".BTLEApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/java/com/dataart/btle_android/BTLEApplication.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
package com.dataart.btle_android;

import android.app.Application;
import android.support.multidex.MultiDexApplication;

import com.dataart.btle_android.devicehive.BTLEDeviceHive;

/**
* Created by alrybakov
*/

public class BTLEApplication extends Application {
public class BTLEApplication extends MultiDexApplication {

private static BTLEApplication application;

private BTLEDeviceHive device;

public static BTLEApplication getApplication() {
return application;
}

@Override
public void onCreate() {
super.onCreate();
Expand All @@ -22,10 +26,6 @@ public void onCreate() {
device = BTLEDeviceHive.newInstance(getApplicationContext());
}

public static BTLEApplication getApplication() {
return application;
}

public BTLEDeviceHive getDevice() {
return device;
}
Expand Down
Loading

0 comments on commit 6a55c5b

Please sign in to comment.