Skip to content

Commit

Permalink
Version 1.16.5 - new icon
Browse files Browse the repository at this point in the history
  • Loading branch information
philips77 committed Jul 12, 2016
1 parent 310e2c1 commit b0057a2
Show file tree
Hide file tree
Showing 22 changed files with 47 additions and 44 deletions.
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
*.iml
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion '23.0.3'

defaultConfig {
applicationId "no.nordicsemi.android.nrftoolbox"
minSdkVersion 18
targetSdkVersion 23
versionCode 43
versionName "1.16.4"
targetSdkVersion 24
versionCode 44
versionName "1.16.5"
}
buildTypes {
release {
Expand All @@ -21,9 +21,9 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services-wearable:9.0.2'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services-wearable:9.2.0'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'no.nordicsemi.android.support.v18:scanner:0.2.0'
compile 'no.nordicsemi.android:log:2.0.0'
compile('org.simpleframework:simple-xml:2.7.1') {
Expand All @@ -35,7 +35,7 @@ dependencies {
wearApp project(':wear')

// The DFU Library is imported automatically from jcenter.
compile 'no.nordicsemi.android:dfu:0.6.2'
compile 'no.nordicsemi.android:dfu:0.6.3'
// If you want to make some changes in the DFU Library, clone the https://github.com/NordicSemiconductor/Android-DFU-Library project into DFULibrary folder,
// add it as a module in Project Structure and uncomment the following line:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
import no.nordicsemi.android.nrftoolbox.adapter.AppAdapter;

public class FeaturesActivity extends AppCompatActivity {
private static final String MCP_CATEGORY = "no.nordicsemi.android.nrftoolbox.LAUNCHER";
private static final String NRF_CONNECT_CATEGORY = "no.nordicsemi.android.nrftoolbox.LAUNCHER";
private static final String UTILS_CATEGORY = "no.nordicsemi.android.nrftoolbox.UTILS";
private static final String MCP_PACKAGE = "no.nordicsemi.android.mcp";
private static final String MCP_CLASS = MCP_PACKAGE + ".DeviceListActivity";
private static final String MCP_MARKET_URI = "market://details?id=no.nordicsemi.android.mcp";
private static final String NRF_CONNECT_PACKAGE = "no.nordicsemi.android.mcp";
private static final String NRF_CONNECT_CLASS = NRF_CONNECT_PACKAGE + ".DeviceListActivity";
private static final String NRF_CONNECT_MARKET_URI = "market://details?id=no.nordicsemi.android.mcp";

private DrawerLayout mDrawerLayout;
private ActionBarDrawerToggle mDrawerToggle;
Expand Down Expand Up @@ -137,26 +137,26 @@ private void setupPluginsInDrawer(final ViewGroup container) {
final LayoutInflater inflater = LayoutInflater.from(this);
final PackageManager pm = getPackageManager();

// look for Master Control Panel
final Intent mcpIntent = new Intent(Intent.ACTION_MAIN);
mcpIntent.addCategory(MCP_CATEGORY);
mcpIntent.setClassName(MCP_PACKAGE, MCP_CLASS);
final ResolveInfo mcpInfo = pm.resolveActivity(mcpIntent, 0);
// look for nRF Connect
final Intent nrfConnectIntent = new Intent(Intent.ACTION_MAIN);
nrfConnectIntent.addCategory(NRF_CONNECT_CATEGORY);
nrfConnectIntent.setClassName(NRF_CONNECT_PACKAGE, NRF_CONNECT_CLASS);
final ResolveInfo nrfConnectInfo = pm.resolveActivity(nrfConnectIntent, 0);

// configure link to Master Control Panel
final TextView mcpItem = (TextView) container.findViewById(R.id.link_mcp);
if (mcpInfo == null) {
mcpItem.setTextColor(Color.GRAY);
// configure link to nRF Connect
final TextView nrfConnectItem = (TextView) container.findViewById(R.id.link_mcp);
if (nrfConnectInfo == null) {
nrfConnectItem.setTextColor(Color.GRAY);
ColorMatrix grayscale = new ColorMatrix();
grayscale.setSaturation(0.0f);
mcpItem.getCompoundDrawables()[0].mutate().setColorFilter(new ColorMatrixColorFilter(grayscale));
nrfConnectItem.getCompoundDrawables()[0].mutate().setColorFilter(new ColorMatrixColorFilter(grayscale));
}
mcpItem.setOnClickListener(new View.OnClickListener() {
nrfConnectItem.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(final View v) {
Intent action = mcpIntent;
if (mcpInfo == null)
action = new Intent(Intent.ACTION_VIEW, Uri.parse(MCP_MARKET_URI));
Intent action = nrfConnectIntent;
if (nrfConnectInfo == null)
action = new Intent(Intent.ACTION_VIEW, Uri.parse(NRF_CONNECT_MARKET_URI));
action.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
action.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

public class AppAdapter extends BaseAdapter {
private static final String CATEGORY = "no.nordicsemi.android.nrftoolbox.LAUNCHER";
private static final String MCP_PACKAGE = "no.nordicsemi.android.mcp";
private static final String NRF_CONNECT_PACKAGE = "no.nordicsemi.android.mcp";

private final Context mContext;
private final PackageManager mPackageManager;
Expand All @@ -60,7 +60,7 @@ public AppAdapter(final Context context) {
final List<ResolveInfo> appList = mApplications = pm.queryIntentActivities(intent, 0);
// TODO remove the following loop after some time, when there will be no more MCP 1.1 at the market.
for (final ResolveInfo info : appList) {
if (MCP_PACKAGE.equals(info.activityInfo.packageName)) {
if (NRF_CONNECT_PACKAGE.equals(info.activityInfo.packageName)) {
appList.remove(info);
break;
}
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_feature_small_bg" />
<item android:drawable="@drawable/ic_mcp_feature_fg" />
<item android:drawable="@drawable/ic_nrf_connect_feature_fg" />
</layer-list>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="?android:selectableItemBackground"
android:drawableLeft="@drawable/ic_mcp_feature_small"
android:drawableLeft="@drawable/ic_nrf_connect_feature_small"
android:drawablePadding="24dp"
android:paddingEnd="@dimen/navdrawer_padding_horiz"
android:paddingStart="@dimen/navdrawer_padding_horiz"
android:text="@string/drawer_plugin_mcp"/>
android:text="@string/drawer_plugin_nrf_connect"/>

</LinearLayout>

Expand Down
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/src/main/res/raw/dfu_mac_3_1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# -------------
# 1. Android device with Android version 4.3+ connected by USB cable with the PC
# 2. The path to Android platform-tools directory must be added to %PATH% environment variable
# 3. nRF Toolbox (1.11.0+) or nRF Master Control Panel (2.1.0+) application installed on the Android device
# 3. nRF Toolbox (1.11.0+) or nRF Connect (2.1.0+) (formerly known as nRF Master Control Panel) application installed on the Android device
# 4. "Developer options" and "USB debugging" must be enabled on the Android device
#
# Usage:
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/dfu_win_3_1.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rem Requirements:
rem -------------
rem 1. Android device with Android version 4.3+ connected by USB cable with the PC
rem 2. The path to Android platform-tools directory must be added to %PATH% environment variable, f.e: C:\Program Files\Android ADT Bundle\sdk\platform-tools
rem 3. nRF Toolbox (1.6.0+) or nRF Master Control Panel (1.8.0+) application installed on the Android device
rem 3. nRF Toolbox (1.6.0+) or nRF Connect (1.8.0+) (formerly known as nRF Master Control Panel) application installed on the Android device
rem 4. "Developer options" and "USB debugging" must be enabled on the Android device
rem
rem Usage:
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/raw/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The peripheral must be programmed with DFU bootloader. Since the DFU_3_0 the but

Execute dfu -? in the command line for usage.

Android 4.3+ device with nRF Toolbox (1.11.0+) or nRF Master Control Panel (2.1.0+) is required.
Android 4.3+ device with nRF Toolbox (1.11.0+) or nRF Connect (2.1.0+) (formerly known as nRF Master Control Panel) is required.
The script runs on Windows OS.

2. DFU_3_0.SH
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<string name="drawer_open">Open</string>
<string name="drawer_close">Close</string>
<string name="drawer_plugins">PLUGINS</string>
<string name="drawer_plugin_mcp">nRF Master Control Panel</string>
<string name="drawer_plugin_nrf_connect">nRF Connect</string>

<string name="battery">%d%%</string>
<string name="not_available">n/a</string>
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.1.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
1 change: 1 addition & 0 deletions common/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
*.iml
6 changes: 3 additions & 3 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
apply plugin: 'com.android.library'

android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "23.0.3"

defaultConfig {
minSdkVersion 18
targetSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
Expand All @@ -42,5 +42,5 @@ android {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:support-v4:24.0.0'
}
1 change: 1 addition & 0 deletions wear/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/build
*.iml
10 changes: 5 additions & 5 deletions wear/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ apply plugin: 'com.android.application'


android {
compileSdkVersion 23
compileSdkVersion 24
buildToolsVersion "23.0.3"

defaultConfig {
applicationId "no.nordicsemi.android.nrftoolbox"
minSdkVersion 20
targetSdkVersion 23
versionCode 41
versionName "1.16.2"
targetSdkVersion 24
versionCode 44
versionName "1.16.5"
}
buildTypes {
release {
Expand All @@ -24,6 +24,6 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.3.0'
compile 'com.google.android.gms:play-services-wearable:9.0.2'
compile 'no.nordicsemi.android.support.v18:scanner:0.1.1'
compile 'no.nordicsemi.android.support.v18:scanner:0.2.0'
compile project(':common')
}

0 comments on commit b0057a2

Please sign in to comment.