mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2025-12-22 00:44:26 +01:00
Migrating to Android SDK v22, typos fixed
This commit is contained in:
26
app/app.iml
26
app/app.iml
@@ -12,9 +12,9 @@
|
||||
<option name="SELECTED_TEST_ARTIFACT" value="_android_test_" />
|
||||
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
|
||||
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugTest" />
|
||||
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" />
|
||||
<option name="SOURCE_GEN_TASK_NAME" value="generateDebugSources" />
|
||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugTestSources" />
|
||||
<option name="TEST_SOURCE_GEN_TASK_NAME" value="generateDebugAndroidTestSources" />
|
||||
<option name="ALLOW_USER_CONFIGURATION" value="false" />
|
||||
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
|
||||
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
|
||||
@@ -25,7 +25,7 @@
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/build/intermediates/classes/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/debug" />
|
||||
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" />
|
||||
@@ -34,12 +34,12 @@
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/debug" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/test/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/test/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/test/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/generated/androidTest/debug" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
|
||||
@@ -83,14 +83,14 @@
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Android API 21 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" exported="" name="gson-2.3.1" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-22.0.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="nrf-logger-v2.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-21.0.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-v4-21.0.3" level="project" />
|
||||
<orderEntry type="library" exported="" name="support-annotations-22.0.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="achartengine-1.1.0" level="project" />
|
||||
<orderEntry type="library" exported="" name="appcompat-v7-22.0.0" level="project" />
|
||||
<orderEntry type="module" module-name="dfu" exported="" />
|
||||
</component>
|
||||
</module>
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
signingConfigs {
|
||||
}
|
||||
compileSdkVersion 21
|
||||
compileSdkVersion 22
|
||||
buildToolsVersion "21.1.2"
|
||||
defaultConfig {
|
||||
applicationId "no.nordicsemi.android.nrftoolbox"
|
||||
minSdkVersion 18
|
||||
targetSdkVersion 21
|
||||
targetSdkVersion 22
|
||||
versionCode 29
|
||||
versionName "1.12.0"
|
||||
}
|
||||
@@ -22,7 +20,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||
compile 'com.android.support:appcompat-v7:21.0.3'
|
||||
compile 'com.android.support:appcompat-v7:22.0.0'
|
||||
compile project(':..:DFULibrary:dfu')
|
||||
compile files('libs/achartengine-1.1.0.jar')
|
||||
compile files('libs/nrf-logger-v2.0.jar')
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
<uses-sdk
|
||||
android:minSdkVersion="18"
|
||||
android:targetSdkVersion="21" />
|
||||
android:targetSdkVersion="22" />
|
||||
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
|
||||
@@ -204,7 +204,7 @@ public class CSCService extends BleProfileService implements CSCManagerCallbacks
|
||||
final Intent disconnect = new Intent(ACTION_DISCONNECT);
|
||||
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
|
||||
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
|
||||
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
|
||||
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));
|
||||
|
||||
@@ -130,13 +130,13 @@ public class ExpandableRecordAdapter extends BaseExpandableListAdapter {
|
||||
final int status = record.status;
|
||||
for (int i = 0; i < 12; ++i)
|
||||
if ((status & (1 << i)) > 0)
|
||||
builder.append(resources.getStringArray(R.array.gls_status_annunciatioin)[i]).append("\n");
|
||||
builder.append(resources.getStringArray(R.array.gls_status_annunciation)[i]).append("\n");
|
||||
builder.setLength(builder.length() - 1);
|
||||
return new Pair<>(resources.getString(R.string.gls_status_annunciatioin_title), builder.toString());
|
||||
return new Pair<>(resources.getString(R.string.gls_status_annunciation_title), builder.toString());
|
||||
}
|
||||
case 2: { // carbohydrate id and unit
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
builder.append(resources.getStringArray(R.array.gls_context_carbohydrare)[record.context.carbohydrateId]).append(" (" + record.context.carbohydrateUnits + " kg)");
|
||||
builder.append(resources.getStringArray(R.array.gls_context_carbohydrare)[record.context.carbohydrateId]).append(" (").append(record.context.carbohydrateUnits).append(" kg)");
|
||||
return new Pair<>(resources.getString(R.string.gls_context_carbohydrare_title), builder.toString());
|
||||
}
|
||||
case 3: { // meal
|
||||
|
||||
@@ -133,7 +133,7 @@ public class HTSService extends BleProfileService implements HTSManagerCallbacks
|
||||
final Intent disconnect = new Intent(ACTION_DISCONNECT);
|
||||
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
|
||||
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
|
||||
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
|
||||
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));
|
||||
|
||||
@@ -57,7 +57,7 @@ public class RSCMeasurementParser {
|
||||
}
|
||||
|
||||
final StringBuilder builder = new StringBuilder();
|
||||
builder.append(String.format("Speed: %.2f m/s, Candence: %d RPM,\n", instantaneousSpeed, instantaneousCadence));
|
||||
builder.append(String.format("Speed: %.2f m/s, Cadence: %d RPM,\n", instantaneousSpeed, instantaneousCadence));
|
||||
if (islmPresent)
|
||||
builder.append(String.format("Instantaneous Stride Length: %.2f m,\n", instantaneousStrideLength));
|
||||
if (tdPreset)
|
||||
|
||||
@@ -43,7 +43,7 @@ public interface BleManagerCallbacks {
|
||||
public void onDeviceDisconnected();
|
||||
|
||||
/**
|
||||
* Some profiles may use this method to notify user that the link was lost. You must call this method in youe Ble Manager instead of {@link #onDeviceDisconnected()} while you discover
|
||||
* Some profiles may use this method to notify user that the link was lost. You must call this method in your Ble Manager instead of {@link #onDeviceDisconnected()} while you discover
|
||||
* disconnection not initiated by the user.
|
||||
*/
|
||||
public void onLinklossOccur();
|
||||
|
||||
@@ -487,7 +487,7 @@ public abstract class BleProfileServiceReadyActivity<E extends BleProfileService
|
||||
}
|
||||
|
||||
/**
|
||||
* Some profiles may use this method to notify user that the link was lost. You must call this method in youe Ble Manager instead of
|
||||
* Some profiles may use this method to notify user that the link was lost. You must call this method in your Ble Manager instead of
|
||||
* {@link #onDeviceDisconnected()} while you discover disconnection not initiated by the user.
|
||||
*/
|
||||
public void onLinklossOccur() {
|
||||
|
||||
@@ -225,7 +225,7 @@ public class ProximityService extends BleProfileService implements ProximityMana
|
||||
secondAction = PendingIntent.getBroadcast(this, FIND_ME_REQ, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
|
||||
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
|
||||
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
|
||||
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));
|
||||
|
||||
@@ -116,7 +116,7 @@ public class RSCService extends BleProfileService implements RSCManagerCallbacks
|
||||
@Override
|
||||
protected void onUnbind() {
|
||||
// when the activity closes we need to show the notification that user is connected to the sensor
|
||||
createNotifcation(R.string.rsc_notification_connected_message, 0);
|
||||
createNotification(R.string.rsc_notification_connected_message, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -176,7 +176,7 @@ public class RSCService extends BleProfileService implements RSCManagerCallbacks
|
||||
* @param defaults
|
||||
* signals that will be used to notify the user
|
||||
*/
|
||||
private void createNotifcation(final int messageResId, final int defaults) {
|
||||
private void createNotification(final int messageResId, final int defaults) {
|
||||
final Intent parentIntent = new Intent(this, FeaturesActivity.class);
|
||||
parentIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
final Intent targetIntent = new Intent(this, RSCActivity.class);
|
||||
@@ -184,7 +184,7 @@ public class RSCService extends BleProfileService implements RSCManagerCallbacks
|
||||
final Intent disconnect = new Intent(ACTION_DISCONNECT);
|
||||
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
|
||||
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
|
||||
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
|
||||
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ScannerServiceParser {
|
||||
private static final byte LE_GENERAL_DISCOVERABLE_MODE = 0x02;
|
||||
|
||||
/**
|
||||
* Checks if device is connectable (as Android cannot get this information directly we just check if it has GENERAL DISCOVERABLE or LIMITED DISCOVERABLE flag set) and has required service UUID in
|
||||
* Checks if device is connectible (as Android cannot get this information directly we just check if it has GENERAL DISCOVERABLE or LIMITED DISCOVERABLE flag set) and has required service UUID in
|
||||
* the advertising packet. The service UUID may be <code>null</code>.
|
||||
* <p>
|
||||
* For further details on parsing BLE advertisement packet data see https://developer.bluetooth.org/Pages/default.aspx Bluetooth Core Specifications Volume 3, Part C, and Section 8
|
||||
|
||||
@@ -123,7 +123,7 @@ public class UARTEditDialog extends DialogFragment implements View.OnClickListen
|
||||
editor.putString(UARTButtonAdapter.PREFS_BUTTON_COMMAND + index, command);
|
||||
editor.putBoolean(UARTButtonAdapter.PREFS_BUTTON_ENABLED + index, active);
|
||||
editor.putInt(UARTButtonAdapter.PREFS_BUTTON_ICON + index, mActiveIcon);
|
||||
editor.commit();
|
||||
editor.apply();
|
||||
|
||||
dismiss();
|
||||
final UARTControlFragment parent = (UARTControlFragment) getParentFragment();
|
||||
|
||||
@@ -146,7 +146,7 @@ public class UARTService extends BleProfileService implements UARTManagerCallbac
|
||||
final Intent disconnect = new Intent(ACTION_DISCONNECT);
|
||||
final PendingIntent disconnectAction = PendingIntent.getBroadcast(this, DISCONNECT_REQ, disconnect, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
// both activities above have launchMode="singleTask" in the AndoridManifest.xml file, so if the task is already running, it will be resumed
|
||||
// both activities above have launchMode="singleTask" in the AndroidManifest.xml file, so if the task is already running, it will be resumed
|
||||
final PendingIntent pendingIntent = PendingIntent.getActivities(this, OPEN_ACTIVITY_REQ, new Intent[] { parentIntent, targetIntent }, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
final Notification.Builder builder = new Notification.Builder(this).setContentIntent(pendingIntent);
|
||||
builder.setContentTitle(getString(R.string.app_name)).setContentText(getString(messageResId, getDeviceName()));
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/feature_horizontal_margin"
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/feature_horizontal_margin"
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/feature_horizontal_margin"
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/action_connect"
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_above="@+id/action_connect"
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/feature_horizontal_margin"
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||
|
||||
<LinearLayout
|
||||
android:baselineAligned="false"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/activity_vertical_margin_bottom"
|
||||
|
||||
@@ -73,8 +73,8 @@
|
||||
<item></item>
|
||||
<item>Sample Location value not available</item>
|
||||
</string-array>
|
||||
<string name="gls_status_annunciatioin_title">Sensor Status Annunciation</string>
|
||||
<string-array name="gls_status_annunciatioin">
|
||||
<string name="gls_status_annunciation_title">Sensor Status Annunciation</string>
|
||||
<string-array name="gls_status_annunciation">
|
||||
<item>Device battery low at time of measurement</item>
|
||||
<item>Sensor malfunction or faulting at time of measurement</item>
|
||||
<item>Sample size for blood or control solution insufficient at time of measurement</item>
|
||||
|
||||
@@ -5,7 +5,7 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.0.0'
|
||||
classpath 'com.android.tools.build:gradle:1.1.0'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Reference in New Issue
Block a user