Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vitas committed Dec 5, 2016
1 parent cc469c4 commit 4ec5c48
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 23 deletions.
5 changes: 2 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId 'com.samebits.beacon.locator'
minSdkVersion 18
targetSdkVersion 22
versionCode 109
versionName '1.0.9'
versionCode 110
versionName '1.1.0'
testApplicationId 'com.samebits.beacon.locator.test'
}
buildTypes {
Expand Down Expand Up @@ -50,7 +50,6 @@ dependencies {
final SUPPORT_LIBRARY_VERSION = '23.3.0'
final DAGGER_VERSION = '2.0.1'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:support-v13:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private void initBeaconManager() {
mBeaconManager.setForegroundScanPeriod(1100L); // Default is 1100L

//mBeaconManager.setMaxTrackingAge(10000);
mBeaconManager.setRegionExitPeriod(12000L);
//mBeaconManager.setRegionExitPeriod(12000L);

/*
RangedBeacon.setMaxTrackingAge() only controls the period of time ranged beacons will continue to be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static boolean isBackgroundScan(Context context) {
}

public static int getBackgroundScanInterval(Context context) {
return Integer.parseInt(getSharedPreferences(context).getString("scan_background_timeout_list", "60000"));
return Integer.parseInt(getSharedPreferences(context).getString("scan_background_timeout_list", "120000"));
}

public static boolean isEddystoneLayoutUID(Context context) {
Expand Down
14 changes: 8 additions & 6 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@
</string-array>

<string-array name="pref_background_scan_timeout_titles">
<item>15 seconds</item>
<item>30 seconds</item>
<item>45 seconds</item>
<item>60 seconds</item>
<item>90 seconds</item>
<item>2 minutes</item>
<item>3 minutes</item>
<item>5 minutes</item>
<item>10 minutes</item>
<item>20 minutes</item>

</string-array>
<string-array name="pref_background_scan_timeout_values">
<item>15000</item>
<item>30000</item>
<item>45000</item>
<item>60000</item>
<item>90000</item>
<item>120000</item>
<item>180000</item>
<item>300000</item>
<item>600000</item>
<item>1200000</item>

</string-array>

<string-array name="pref_be_event_range_array">
Expand Down
44 changes: 32 additions & 12 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,31 @@
<string name="dialog_error_title">Error</string>

<string name="dialog_error_functionality_limited">Functionality limited</string>
<string name="error_message_location_access_not_granted">\"Since location access has not been granted, this app will not be able to discover beacons when in the background.</string>
<string name="error_message_location_access_not_granted">\"Since location access has not been
granted, this app will not be able to discover beacons when in the background.
</string>
<string name="dialog_error_need_location_access">This app needs location access</string>
<string name="error_message_location_access_need_tobe_granted">Please grant location access so this app can detect beacons in the background.</string>
<string name="error_message_location_access_need_tobe_granted">Please grant location access so
this app can detect beacons in the background.
</string>
<string name="dialog_error_ble_not_enabled">Bluetooth not enabled</string>
<string name="error_message_please_enable_bluetooth">Please enable bluetooth in settings and restart this application.</string>
<string name="error_message_please_enable_bluetooth">Please enable bluetooth in settings and
restart this application.
</string>
<string name="dialog_error_ble_not_supported">Bluetooth LE not available</string>
<string name="error_message_bluetooth_le_not_supported">Sorry, this device does not support Bluetooth LE.</string>
<string name="error_message_bluetooth_le_not_supported">Sorry, this device does not support
Bluetooth LE.
</string>

<!-- Strings related to Settings -->

<!-- Scan settings -->
<string name="pref_title_background_scan">Enable background scan</string>
<string name="pref_description_background_scan">Enables to run scanning in background and trigger actions.</string>
<string name="pref_title_background_scan_timeout">Background scan interval (only Android 4.X)</string>
<string name="pref_description_background_scan">Enables to run scanning in background and
trigger actions.
</string>
<string name="pref_title_background_scan_timeout">Background scan interval (only Android 4.X)
</string>
<string name="pref_title_region_name">Region name</string>
<string name="pref_default_region_name">Default</string>
<string name="pref_title_manual_scan_timeout">Manual scan interval</string>
Expand Down Expand Up @@ -130,7 +141,8 @@
<string name="pref_be_event_enter_region">Enter region (in range)</string>
<string name="pref_be_summary_event_enter_region">Occurs when beacon is entering region</string>
<string name="pref_be_event_leave_region">Leave region (out of range)</string>
<string name="pref_be_summary_event_leave_region">Occurs when beacon is going out of range</string>
<string name="pref_be_summary_event_leave_region">Occurs when beacon is going out of range
</string>
<string name="pref_be_event_near">Beacon near you</string>
<string name="pref_be_summary_event_near">Occurs when beacon is close to you</string>

Expand All @@ -146,7 +158,9 @@
<string name="pref_bn_notification_category">Enable alarm notification</string>
<string name="pref_bn_notification_action">Notification</string>
<string name="pref_bn_notification_action_message">Message</string>
<string name="pref_bn_default_notification_action_message">Default Message (Replace with yours)</string>
<string name="pref_bn_default_notification_action_message">Default Message (Replace with
yours)
</string>
<string name="pref_bn_notification_action_ringtone">Ring tone</string>
<string name="pref_bn_none_notification_action_ringtone">None (Silent)</string>
<string name="pref_bn_notification_action_vibrate">Vibrate</string>
Expand Down Expand Up @@ -175,22 +189,28 @@
<!-- tasker -->
<string name="action_tasker_default">Select task</string>
<string name="action_tasker_download">Buy/try Tasker</string>
<string name="action_tasker_message">Tasker is an application for Android which performs tasks (sets of actions) based on contexts (application, time, date, location, event, gesture) in user-defined profiles or in clickable or timer home screen widgets.
\n\nnBeacon Locator may use Beacons to trigger the task you specify.</string>
<string name="action_tasker_message">Tasker is an application for Android which performs tasks
(sets of actions) based on contexts (application, time, date, location, event, gesture) in
user-defined profiles or in clickable or timer home screen widgets.
\n\nnBeacon Locator may use Beacons to trigger the task you specify.
</string>
<string name="tasker_download">Google Play</string>
<string name="tasker_website">Download trial</string>
<string name="tasker_not_installed">Tasker application is not installed.</string>
<string name="tasker_error">An error occurred when launching the task.</string>
<string name="tasker_success">The task has been executed.</string>
<string name="tasker_disabled">Tasker is disabled.</string>
<string name="tasker_external_access_denided">External access to Tasker is disabled. See Preferences -> MISC -> Allow External Access in the Tasker.</string>
<string name="tasker_external_access_denided">External access to Tasker is disabled. See
Preferences -> MISC -> Allow External Access in the Tasker.
</string>

<!-- actions -->
<string name="action_alarm_text_title">Beacon Event"</string>
<string name="action_location_no_location">Current GPS Location is unknown</string>
<string name="action_urlaction_error">Cannot open url, url is invalid or malformed</string>
<string name="action_start_application_error">Can not start application, not exists</string>
<string name="action_action_param_is_required">You have to provide a parameter for the action</string>
<string name="action_action_param_is_required">You have to provide a parameter for the action
</string>
<string name="notification_display_last_position">your location on map</string>

<!-- enums -->
Expand Down

0 comments on commit 4ec5c48

Please sign in to comment.