From b8545b95899a110443890f67c4ecfea28397f10c Mon Sep 17 00:00:00 2001 From: Wiktor Gworek Date: Fri, 24 Jul 2015 14:10:15 +0200 Subject: [PATCH] Version 0.8.2. - This is mainly a bugfix release. - Fixed (https://github.com/Estimote/Android-SDK/issues/109): Documentation Bug. - Fixed (https://github.com/Estimote/Android-SDK/issues/117): Crash after update to 0.8 version. - SDK demos are now using Material Design (h/t @RingoMckraken). --- CHANGELOG.md | 6 ++++ Demos/build.gradle | 2 +- Demos/src/main/AndroidManifest.xml | 6 ++-- .../demos/activities/AllDemosActivity.java | 6 ++-- .../demos/activities/BaseActivity.java | 28 ++++++++++++++++++ .../CharacteristicsDemoActivity.java | 16 ++++------ .../activities/DistanceBeaconActivity.java | 16 ++++------ ...tivity.java => EddystoneDemoActivity.java} | 20 ++++--------- .../demos/activities/ListBeaconsActivity.java | 19 ++++-------- ...tivity.java => ListEddystoneActivity.java} | 25 +++++----------- .../activities/ListNearablesActivity.java | 17 ++++------- .../activities/NearablesDemoActivity.java | 16 ++++------ .../demos/activities/NotifyDemoActivity.java | 16 ++++------ .../demos/activities/UpdateDemoActivity.java | 16 ++++------ Demos/src/main/res/layout/all_demos.xml | 25 +++++++++++----- Demos/src/main/res/values/styles.xml | 9 ------ EstimoteSDK/estimote-sdk-javadoc.jar | Bin 0 -> 221293 bytes EstimoteSDK/estimote-sdk-preview-javadoc.jar | Bin 220557 -> 0 bytes EstimoteSDK/estimote-sdk-preview.aar | Bin 932867 -> 0 bytes EstimoteSDK/estimote-sdk.aar | Bin 0 -> 933269 bytes README.md | 4 +-- 21 files changed, 109 insertions(+), 138 deletions(-) create mode 100644 Demos/src/main/java/com/estimote/examples/demos/activities/BaseActivity.java rename Demos/src/main/java/com/estimote/examples/demos/activities/{EddystonesDemoActivity.java => EddystoneDemoActivity.java} (89%) rename Demos/src/main/java/com/estimote/examples/demos/activities/{ListEddystonesActivity.java => ListEddystoneActivity.java} (83%) create mode 100644 EstimoteSDK/estimote-sdk-javadoc.jar delete mode 100644 EstimoteSDK/estimote-sdk-preview-javadoc.jar delete mode 100644 EstimoteSDK/estimote-sdk-preview.aar create mode 100644 EstimoteSDK/estimote-sdk.aar diff --git a/CHANGELOG.md b/CHANGELOG.md index e86836b..ad6c0f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Changelog ===================== +## 0.8.2 (July 24, 2015) + - This is mainly a bugfix release. + - Fixed (https://github.com/Estimote/Android-SDK/issues/109): Documentation Bug. + - Fixed (https://github.com/Estimote/Android-SDK/issues/117): Crash after update to 0.8 version. + - SDK demos are now using Material Design (h/t @RingoMckraken). + ## 0.8.1 (July 15, 2015) - Small fixes for Eddystone protocol. diff --git a/Demos/build.gradle b/Demos/build.gradle index f10a917..52d758c 100644 --- a/Demos/build.gradle +++ b/Demos/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile(name:'estimote-sdk-preview', ext:'aar') + compile(name:'estimote-sdk', ext:'aar') compile 'com.android.support:appcompat-v7:22.2.0' } diff --git a/Demos/src/main/AndroidManifest.xml b/Demos/src/main/AndroidManifest.xml index e8d76fd..dca317c 100644 --- a/Demos/src/main/AndroidManifest.xml +++ b/Demos/src/main/AndroidManifest.xml @@ -39,7 +39,7 @@ android:screenOrientation="portrait"/> @@ -64,8 +64,8 @@ android:label="Update Firmware Demo" android:screenOrientation="portrait"/> - eddystones) { - toolbar.setSubtitle("Found eddystones: " + eddystones.size()); + toolbar.setSubtitle("Found beacons with Eddystone protocol: " + eddystones.size()); adapter.replaceWith(eddystones); } }); @@ -124,7 +115,7 @@ private AdapterView.OnItemClickListener createOnItemClickListener() { if (getIntent().getStringExtra(EXTRAS_TARGET_ACTIVITY) != null) { try { Class clazz = Class.forName(getIntent().getStringExtra(EXTRAS_TARGET_ACTIVITY)); - Intent intent = new Intent(ListEddystonesActivity.this, clazz); + Intent intent = new Intent(ListEddystoneActivity.this, clazz); intent.putExtra(EXTRAS_EDDYSTONE, adapter.getItem(position)); startActivity(intent); } catch (ClassNotFoundException e) { diff --git a/Demos/src/main/java/com/estimote/examples/demos/activities/ListNearablesActivity.java b/Demos/src/main/java/com/estimote/examples/demos/activities/ListNearablesActivity.java index 3fcf4bc..d88ea15 100644 --- a/Demos/src/main/java/com/estimote/examples/demos/activities/ListNearablesActivity.java +++ b/Demos/src/main/java/com/estimote/examples/demos/activities/ListNearablesActivity.java @@ -24,7 +24,7 @@ * * @author wiktor.gworek@estimote.com (Wiktor Gworek) */ -public class ListNearablesActivity extends AppCompatActivity { +public class ListNearablesActivity extends BaseActivity { private static final String TAG = ListNearablesActivity.class.getSimpleName(); @@ -35,22 +35,15 @@ public class ListNearablesActivity extends AppCompatActivity { private BeaconManager beaconManager; private NearableListAdapter adapter; - private Toolbar toolbar; + @Override protected int getLayoutResId() { + return R.layout.main; + } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - toolbar = (Toolbar) findViewById(R.id.toolbar); - toolbar.setNavigationIcon(R.drawable.ic_action_navigation_arrow_back); - toolbar.setTitle(getTitle()); - toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override public void onClick(View v) { - onBackPressed(); - } - }); + // Configure device list. adapter = new NearableListAdapter(this); ListView list = (ListView) findViewById(R.id.device_list); diff --git a/Demos/src/main/java/com/estimote/examples/demos/activities/NearablesDemoActivity.java b/Demos/src/main/java/com/estimote/examples/demos/activities/NearablesDemoActivity.java index 75cda5e..cf7129c 100644 --- a/Demos/src/main/java/com/estimote/examples/demos/activities/NearablesDemoActivity.java +++ b/Demos/src/main/java/com/estimote/examples/demos/activities/NearablesDemoActivity.java @@ -15,26 +15,20 @@ * * @author wiktor@estimote.com (Wiktor Gworek) */ -public class NearablesDemoActivity extends AppCompatActivity { +public class NearablesDemoActivity extends BaseActivity { private static final String TAG = NearablesDemoActivity.class.getSimpleName(); private Nearable currentNearable; private BeaconManager beaconManager; + @Override protected int getLayoutResId() { + return R.layout.nearable_demo; + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.nearable_demo); - - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); - toolbar.setNavigationIcon(R.drawable.ic_action_navigation_arrow_back); - toolbar.setTitle(getTitle()); - toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override public void onClick(View v) { - onBackPressed(); - } - }); currentNearable = getIntent().getExtras().getParcelable(ListNearablesActivity.EXTRAS_NEARABLE); displayCurrentNearableInfo(); diff --git a/Demos/src/main/java/com/estimote/examples/demos/activities/NotifyDemoActivity.java b/Demos/src/main/java/com/estimote/examples/demos/activities/NotifyDemoActivity.java index fef62c5..6c576c2 100644 --- a/Demos/src/main/java/com/estimote/examples/demos/activities/NotifyDemoActivity.java +++ b/Demos/src/main/java/com/estimote/examples/demos/activities/NotifyDemoActivity.java @@ -30,7 +30,7 @@ * * @author wiktor@estimote.com (Wiktor Gworek) */ -public class NotifyDemoActivity extends AppCompatActivity { +public class NotifyDemoActivity extends BaseActivity { private static final String TAG = NotifyDemoActivity.class.getSimpleName(); private static final int NOTIFICATION_ID = 123; @@ -39,19 +39,13 @@ public class NotifyDemoActivity extends AppCompatActivity { private NotificationManager notificationManager; private Region region; + @Override protected int getLayoutResId() { + return R.layout.notify_demo; + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.notify_demo); - - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); - toolbar.setNavigationIcon(R.drawable.ic_action_navigation_arrow_back); - toolbar.setTitle(getTitle()); - toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override public void onClick(View v) { - onBackPressed(); - } - }); Beacon beacon = getIntent().getParcelableExtra(ListBeaconsActivity.EXTRAS_BEACON); region = new Region("regionId", beacon.getProximityUUID(), beacon.getMajor(), beacon.getMinor()); diff --git a/Demos/src/main/java/com/estimote/examples/demos/activities/UpdateDemoActivity.java b/Demos/src/main/java/com/estimote/examples/demos/activities/UpdateDemoActivity.java index de3de4d..8080cd9 100644 --- a/Demos/src/main/java/com/estimote/examples/demos/activities/UpdateDemoActivity.java +++ b/Demos/src/main/java/com/estimote/examples/demos/activities/UpdateDemoActivity.java @@ -20,7 +20,7 @@ * * @author wiktor@estimote.com (Wiktor Gworek) */ -public class UpdateDemoActivity extends AppCompatActivity { +public class UpdateDemoActivity extends BaseActivity { private Beacon beacon; private BeaconConnection connection; @@ -29,19 +29,13 @@ public class UpdateDemoActivity extends AppCompatActivity { private TextView beaconDetailsView; private Button updateButton; + @Override protected int getLayoutResId() { + return R.layout.update_demo; + } + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - setContentView(R.layout.update_demo); - - Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); - toolbar.setNavigationIcon(R.drawable.ic_action_navigation_arrow_back); - toolbar.setTitle(getTitle()); - toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override public void onClick(View v) { - onBackPressed(); - } - }); statusView = (TextView) findViewById(R.id.status); beaconDetailsView = (TextView) findViewById(R.id.beacon_details); diff --git a/Demos/src/main/res/layout/all_demos.xml b/Demos/src/main/res/layout/all_demos.xml index 78a936c..e8e39a5 100644 --- a/Demos/src/main/res/layout/all_demos.xml +++ b/Demos/src/main/res/layout/all_demos.xml @@ -9,48 +9,57 @@