Skip to content

Commit

Permalink
Merge branch 'feature/avs-ble-manage-device-features' into 'versions/…
Browse files Browse the repository at this point in the history
…avs-ble'

Mange device features and support for 128 bit UUID device provisioning

See merge request idf/esp-idf-provisioning-android!19
  • Loading branch information
KhushbuShah25 committed Dec 6, 2019
2 parents 003c3bd + 2ac8112 commit 259d002
Show file tree
Hide file tree
Showing 53 changed files with 4,088 additions and 771 deletions.
18 changes: 4 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ android {
defaultConfig {
applicationId "com.espressif.provbleavs"
minSdkVersion 21
targetSdkVersion 27
versionCode 8
versionName "1.3.3"
targetSdkVersion 28
versionCode 10
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.config
}
Expand All @@ -29,11 +29,6 @@ android {
resValue "string", "proof_of_possesion", "abcd1234"
resValue "string", "wifi_base_url", "192.168.4.1:80"
resValue "string", "wifi_network_name_prefix", "ESP-Alexa-"
resValue "string", "ble_service_uuid", "0000ffff-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_session_uuid", "0000ff51-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_config_uuid", "0000ff52-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_avsconfig_uuid", "0000ff54-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_scanconfig_uuid", "0000ff50-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_device_name_prefix", "ESP-Alexa-"
signingConfig signingConfigs.config
}
Expand All @@ -44,12 +39,6 @@ android {
resValue "string", "proof_of_possesion", "abcd1234"
resValue "string", "wifi_base_url", "192.168.4.1:80"
resValue "string", "wifi_network_name_prefix", "ESP-Alexa-"
resValue "string", "ble_service_uuid", "0000ffff-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_session_uuid", "0000ff51-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_config_uuid", "0000ff52-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_avsconfig_uuid", "0000ff54-0000-1000-8000-00805f9b34fb"
resValue "string", "ble_scanconfig_uuid", "0000ff50-0000-1000-8000-00805f9b34fb"

resValue "string", "ble_device_name_prefix", "ESP-Alexa-"
signingConfig signingConfigs.config
}
Expand Down Expand Up @@ -113,4 +102,5 @@ dependencies {
implementation files('../login-with-amazon-sdk.jar')
implementation 'com.google.crypto.tink:tink-android:1.1.0'
implementation 'com.github.custanator:upnpdiscovery:1.0.1'
implementation 'com.github.f0ris.sweetalert:library:1.5.1'
}
33 changes: 29 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.espressif.provision">

<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -13,12 +14,12 @@

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:icon="@mipmap/ic_esp_alexa_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
android:usesCleartextTraffic="true"
tools:replace="android:icon">
<activity
android:name="com.espressif.ui.activities.EspMainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
Expand Down Expand Up @@ -98,7 +99,31 @@
android:label="@string/title_activity_pop"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="com.espressif.ui.activities.DeviceActivity"
android:label="@string/title_activity_device"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="com.espressif.ui.activities.LanguageListActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="com.espressif.ui.activities.DeviceInfoActivity"
android:label="@string/title_activity_device_info"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="com.espressif.ui.activities.SoundActivity"
android:label="@string/title_activity_sound"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />
<activity
android:name="com.espressif.ui.activities.AppInfoActivity"
android:label="@string/title_activity_app_info"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar" />

</application>

</manifest>
</manifest>
16 changes: 15 additions & 1 deletion app/src/main/java/com/espressif/AppConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ public class AppConstants {
public static final short WIFI_WPA_WPA2_PSK = 4;
public static final short WIFI_WPA2_ENTERPRISE = 5;

// End point names
public static final String HANDLER_PROV_SCAN = "prov-scan";
public static final String HANDLER_PROV_SESSION = "prov-session";
public static final String HANDLER_PROV_CONFIG = "prov-config";
public static final String HANDLER_PROTO_VER = "proto-ver";
public static final String HANDLER_AVS_CONFIG = "avsconfig";

// Keys used to pass data between activities and to store data in SharedPreference.
public static final String KEY_PROOF_OF_POSSESSION = "proof_of_possession";
public static final String KEY_WIFI_SECURITY_TYPE = "wifi_security";
public static final String KEY_PROOF_OF_POSSESSION = "proof_of_possession";
public static final String KEY_WIFI_NETWORK_NAME_PREFIX = "wifi_network_name_prefix";
public static final String KEY_BLE_DEVICE_NAME_PREFIX = "ble_device_name_prefix";
public static final String KEY_DEVICE_NAME = "device_name";
public static final String KEY_STATUS_MSG = "status_msg";
public static final String KEY_DEVICE_INFO = "device_info";
public static final String KEY_DEVICE_LANGUAGE = "device_language";

public static final String ESP_PREFERENCES = "Esp_Preferences";
}
Loading

0 comments on commit 259d002

Please sign in to comment.