Skip to content

Commit

Permalink
Version 0.8.2.
Browse files Browse the repository at this point in the history
 - This is mainly a bugfix release.
 - Fixed (#109): Documentation Bug.
 - Fixed (#117): Crash after update to 0.8 version.
 - SDK demos are now using Material Design (h/t @RingoMckraken).
  • Loading branch information
wiktor committed Jul 24, 2015
1 parent 5d0d98c commit b8545b9
Show file tree
Hide file tree
Showing 21 changed files with 109 additions and 138 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Demos/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
6 changes: 3 additions & 3 deletions Demos/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
android:screenOrientation="portrait"/>

<activity
android:name=".activities.ListEddystonesActivity"
android:name=".activities.ListEddystoneActivity"
android:label="Select Eddystone"
android:screenOrientation="portrait"/>

Expand All @@ -64,8 +64,8 @@
android:label="Update Firmware Demo"
android:screenOrientation="portrait"/>

<activity android:name=".activities.EddystonesDemoActivity"
android:label="Eddystones Demo"
<activity android:name=".activities.EddystoneDemoActivity"
android:label="Eddystone Demo"
android:screenOrientation="portrait"/>

<activity android:name=".activities.NearablesDemoActivity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public class AllDemosActivity extends AppCompatActivity {
startActivity(intent);
}
});
findViewById(R.id.eddystones_demo_button).setOnClickListener(new View.OnClickListener() {
findViewById(R.id.eddystone_demo_button).setOnClickListener(new View.OnClickListener() {
@Override public void onClick(View v) {
Intent intent = new Intent(AllDemosActivity.this, ListEddystonesActivity.class);
intent.putExtra(ListEddystonesActivity.EXTRAS_TARGET_ACTIVITY, EddystonesDemoActivity.class.getName());
Intent intent = new Intent(AllDemosActivity.this, ListEddystoneActivity.class);
intent.putExtra(ListEddystoneActivity.EXTRAS_TARGET_ACTIVITY, EddystoneDemoActivity.class.getName());
startActivity(intent);
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.estimote.examples.demos.activities;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import com.estimote.examples.demos.R;

public abstract class BaseActivity extends AppCompatActivity {

protected Toolbar toolbar;

protected abstract int getLayoutResId();

@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(getLayoutResId());

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();
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*
* @author [email protected] (Wiktor Gworek)
*/
public class CharacteristicsDemoActivity extends AppCompatActivity {
public class CharacteristicsDemoActivity extends BaseActivity {

private Beacon beacon;
private BeaconConnection connection;
Expand All @@ -28,19 +28,13 @@ public class CharacteristicsDemoActivity extends AppCompatActivity {
private EditText minorEditView;
private View afterConnectedView;

@Override protected int getLayoutResId() {
return R.layout.characteristics_demo;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.characteristics_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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @author [email protected] (Wiktor Gworek)
*/
public class DistanceBeaconActivity extends AppCompatActivity {
public class DistanceBeaconActivity extends BaseActivity {

private static final String TAG = DistanceBeaconActivity.class.getSimpleName();

Expand All @@ -36,19 +36,13 @@ public class DistanceBeaconActivity extends AppCompatActivity {
private int startY = -1;
private int segmentLength = -1;

@Override protected int getLayoutResId() {
return R.layout.distance_view;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.distance_view);

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();
}
});

dotView = findViewById(R.id.dot);
beacon = getIntent().getParcelableExtra(ListBeaconsActivity.EXTRAS_BEACON);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.estimote.examples.demos.activities;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
Expand All @@ -19,7 +17,7 @@
*
* @author [email protected] (Wiktor Gworek)
*/
public class EddystonesDemoActivity extends AppCompatActivity {
public class EddystoneDemoActivity extends BaseActivity {

private Eddystone eddystone;
private BeaconConnection connection;
Expand All @@ -29,26 +27,20 @@ public class EddystonesDemoActivity extends AppCompatActivity {
private EditText eddystoneEditView;
private View afterConnectedView;

@Override protected int getLayoutResId() {
return R.layout.eddystones_demo;
}

@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.eddystones_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);
eddystoneDetailsView = (TextView) findViewById(R.id.eddystone_details);
TextView eddystoneIdLabel = (TextView) findViewById(R.id.eddystone_id_label);
afterConnectedView = findViewById(R.id.after_connected);
eddystoneEditView = (EditText) findViewById(R.id.eddystone_id);

eddystone = getIntent().getParcelableExtra(ListEddystonesActivity.EXTRAS_EDDYSTONE);
eddystone = getIntent().getParcelableExtra(ListEddystoneActivity.EXTRAS_EDDYSTONE);
connection = new BeaconConnection(this, eddystone.macAddress, createConnectionCallback());

eddystoneIdLabel.setText(eddystone.isUrl() ? "Eddystone's url" : "Eddystone's namespace");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import android.content.Intent;
import android.os.Bundle;
import android.os.RemoteException;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
Expand All @@ -26,7 +24,7 @@
*
* @author [email protected] (Wiktor Gworek)
*/
public class ListBeaconsActivity extends AppCompatActivity {
public class ListBeaconsActivity extends BaseActivity {

private static final String TAG = ListBeaconsActivity.class.getSimpleName();

Expand All @@ -38,20 +36,13 @@ public class ListBeaconsActivity extends AppCompatActivity {

private BeaconManager beaconManager;
private BeaconListAdapter 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 BeaconListAdapter(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
Expand All @@ -24,9 +22,9 @@
*
* @author [email protected] (Wiktor Gworek)
*/
public class ListEddystonesActivity extends AppCompatActivity {
public class ListEddystoneActivity extends BaseActivity {

private static final String TAG = ListEddystonesActivity.class.getSimpleName();
private static final String TAG = ListEddystoneActivity.class.getSimpleName();

public static final String EXTRAS_TARGET_ACTIVITY = "extrasTargetActivity";
public static final String EXTRAS_EDDYSTONE = "extrasEddystone";
Expand All @@ -35,20 +33,13 @@ public class ListEddystonesActivity extends AppCompatActivity {

private BeaconManager beaconManager;
private EddystonesListAdapter 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 EddystonesListAdapter(this);
Expand Down Expand Up @@ -106,7 +97,7 @@ private void connectToService() {

beaconManager.setEddystoneListener(new BeaconManager.EddystoneListener() {
@Override public void onEddystonesFound(List<Eddystone> eddystones) {
toolbar.setSubtitle("Found eddystones: " + eddystones.size());
toolbar.setSubtitle("Found beacons with Eddystone protocol: " + eddystones.size());
adapter.replaceWith(eddystones);
}
});
Expand All @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author [email protected] (Wiktor Gworek)
*/
public class ListNearablesActivity extends AppCompatActivity {
public class ListNearablesActivity extends BaseActivity {

private static final String TAG = ListNearablesActivity.class.getSimpleName();

Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,20 @@
*
* @author [email protected] (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();
Expand Down
Loading

1 comment on commit b8545b9

@RingoMckraken
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot! You guys rock!

Please sign in to comment.