diff --git a/app/.gitignore b/app/.gitignore index 796b96d1..e8fa30f8 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -1 +1,2 @@ /build +*.iml diff --git a/app/build.gradle b/app/build.gradle index e55952a0..4f3e1067 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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 { @@ -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') { @@ -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: diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/FeaturesActivity.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/FeaturesActivity.java index af608004..31af2552 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/FeaturesActivity.java +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/FeaturesActivity.java @@ -52,11 +52,11 @@ import java.util.List; 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; @@ -137,26 +137,26 @@ public class FeaturesActivity extends AppCompatActivity { 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 { diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/adapter/AppAdapter.java b/app/src/main/java/no/nordicsemi/android/nrftoolbox/adapter/AppAdapter.java index 3e92c16a..a99e88e7 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/adapter/AppAdapter.java +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/adapter/AppAdapter.java @@ -41,7 +41,7 @@ import no.nordicsemi.android.nrftoolbox.R; 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; @@ -60,7 +60,7 @@ public class AppAdapter extends BaseAdapter { final List 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; } diff --git a/app/src/main/res/drawable-xhdpi/ic_mcp_feature_fg.png b/app/src/main/res/drawable-xhdpi/ic_mcp_feature_fg.png deleted file mode 100644 index f57497a6..00000000 Binary files a/app/src/main/res/drawable-xhdpi/ic_mcp_feature_fg.png and /dev/null differ diff --git a/app/src/main/res/drawable-xhdpi/ic_nrf_connect_feature_fg.png b/app/src/main/res/drawable-xhdpi/ic_nrf_connect_feature_fg.png new file mode 100644 index 00000000..e13cf3b6 Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_nrf_connect_feature_fg.png differ diff --git a/app/src/main/res/drawable/ic_mcp_feature_small.xml b/app/src/main/res/drawable/ic_nrf_connect_feature_small.xml similarity index 96% rename from app/src/main/res/drawable/ic_mcp_feature_small.xml rename to app/src/main/res/drawable/ic_nrf_connect_feature_small.xml index 01d2b05d..60e5eed0 100644 --- a/app/src/main/res/drawable/ic_mcp_feature_small.xml +++ b/app/src/main/res/drawable/ic_nrf_connect_feature_small.xml @@ -22,5 +22,5 @@ --> - + \ No newline at end of file diff --git a/app/src/main/res/layout/drawer.xml b/app/src/main/res/layout/drawer.xml index c2e4e35c..5bbf181c 100644 --- a/app/src/main/res/layout/drawer.xml +++ b/app/src/main/res/layout/drawer.xml @@ -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"/> diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png index 628705f7..5411d634 100644 Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..13c703a7 Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png index b253a292..4df1aa1a 100644 Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d282a9af..152dec98 100644 Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index e0dc75c6..e04c2802 100644 Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/app/src/main/res/raw/dfu_mac_3_1.sh b/app/src/main/res/raw/dfu_mac_3_1.sh index 1ec7ceab..f74b25a9 100644 --- a/app/src/main/res/raw/dfu_mac_3_1.sh +++ b/app/src/main/res/raw/dfu_mac_3_1.sh @@ -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: diff --git a/app/src/main/res/raw/dfu_win_3_1.bat b/app/src/main/res/raw/dfu_win_3_1.bat index ced47100..57c75d5d 100644 --- a/app/src/main/res/raw/dfu_win_3_1.bat +++ b/app/src/main/res/raw/dfu_win_3_1.bat @@ -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: diff --git a/app/src/main/res/raw/readme.txt b/app/src/main/res/raw/readme.txt index 88a6de5b..51d04583 100644 --- a/app/src/main/res/raw/readme.txt +++ b/app/src/main/res/raw/readme.txt @@ -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 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 55af6d9f..2c88ae3a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -40,7 +40,7 @@ Open Close PLUGINS - nRF Master Control Panel + nRF Connect %d%% n/a diff --git a/build.gradle b/build.gradle index f6e90731..e220f0b8 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/common/.gitignore b/common/.gitignore index 796b96d1..e8fa30f8 100644 --- a/common/.gitignore +++ b/common/.gitignore @@ -1 +1,2 @@ /build +*.iml diff --git a/common/build.gradle b/common/build.gradle index b63b2316..5428b7ea 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -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" } @@ -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' } diff --git a/wear/.gitignore b/wear/.gitignore index 796b96d1..d0b97c6b 100644 --- a/wear/.gitignore +++ b/wear/.gitignore @@ -1 +1,2 @@ /build +*.iml \ No newline at end of file diff --git a/wear/build.gradle b/wear/build.gradle index 37d9b55f..6236d129 100644 --- a/wear/build.gradle +++ b/wear/build.gradle @@ -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 { @@ -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') }