Prepare 0.6.1, implement osmand warning for long distance, change icons
|
@ -5,7 +5,7 @@ public class Version {
|
|||
public static final String APP_NAME = "OsmAnd"; //$NON-NLS-1$
|
||||
public static final String APP_MAP_CREATOR_NAME = "OsmAndMapCreator"; //$NON-NLS-1$
|
||||
public static final String APP_VERSION = "0.6.1"; //$NON-NLS-1$
|
||||
public static final String APP_DESCRIPTION = "alpha (b1)"; //$NON-NLS-1$
|
||||
public static final String APP_DESCRIPTION = "beta (b1)"; //$NON-NLS-1$
|
||||
public static final boolean VELCOM_EDITION = false;
|
||||
|
||||
public static final String APP_NAME_VERSION = APP_NAME + " " + APP_VERSION; //$NON-NLS-1$
|
||||
|
|
BIN
OsmAnd/res/drawable-hdpi/icon.png
Normal file
After Width: | Height: | Size: 6 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3.3 KiB |
|
@ -1,5 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<resources>
|
||||
<string name="use_osmand_routing_service">OsmAnd offline routing</string>
|
||||
<string name="use_osmand_routing_service_descr">Use offline routing for long distances (experimental)</string>
|
||||
<string name="osmand_routing_experimental">OsmAnd offline routing is experimental feature and it doesn\'t work for distance more than 20 km.\n Routing service is automatically switched to online Cloudmade.</string>
|
||||
<string name="specified_dir_doesnt_exist">Can not find specified directory.</string>
|
||||
<string name="application_dir">Storage directory</string>
|
||||
<string name="application_dir_change_warning">Changing storage directory will not move or delete the data. You must do it yourself! Do it at your own risk! Continue anyway?</string>
|
||||
|
|
|
@ -22,10 +22,9 @@
|
|||
<CheckBoxPreference android:summary="@string/fast_route_mode_descr" android:title="@string/fast_route_mode"
|
||||
android:key="fast_route_mode"></CheckBoxPreference>
|
||||
<ListPreference android:title="@string/voice_provider" android:key="voice_provider" android:summary="@string/voice_provider_descr"></ListPreference>
|
||||
<!--
|
||||
<CheckBoxPreference android:key="use_internet_to_calculate_route" android:title="@string/use_online_routing"
|
||||
android:summary="@string/use_online_routing_descr"></CheckBoxPreference>
|
||||
-->
|
||||
<CheckBoxPreference android:summary="@string/use_osmand_routing_service_descr" android:title="@string/use_osmand_routing_service"
|
||||
android:key="use_osmand_routing_service"></CheckBoxPreference>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
<PreferenceScreen android:title="@string/index_settings" android:summary="@string/index_settings_descr">
|
||||
|
|
|
@ -310,6 +310,18 @@ public class OsmandSettings {
|
|||
return prefs.getInt(SAVE_TRACK_INTERVAL, 5);
|
||||
}
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public static final String USE_OSMAND_ROUTING_SERVICE_ALWAYS = "use_osmand_routing_service"; //$NON-NLS-1$
|
||||
public static final boolean USE_OSMAND_ROUTING_SERVICE_ALWAYS_DEF = false;
|
||||
|
||||
public static boolean isOsmandRoutingServiceUsed(Context ctx) {
|
||||
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
|
||||
return prefs.getBoolean(USE_OSMAND_ROUTING_SERVICE_ALWAYS, USE_OSMAND_ROUTING_SERVICE_ALWAYS_DEF);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// this value string is synchronized with settings_pref.xml preference name
|
||||
public static final String SHOW_OSM_BUGS = "show_osm_bugs"; //$NON-NLS-1$
|
||||
public static final boolean SHOW_OSM_BUGS_DEF = false;
|
||||
|
|
|
@ -127,7 +127,7 @@ public class MainMenuActivity extends Activity {
|
|||
SharedPreferences prefs = OsmandSettings.getPrefs(this);
|
||||
|
||||
// only one commit should be with contribution version flag
|
||||
prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
||||
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
||||
if (prefs.contains(CONTRIBUTION_VERSION_FLAG)) {
|
||||
final TextView appName = (TextView) findViewById(R.id.AppName);
|
||||
appName.setText("OsmAnd!");
|
||||
|
|
|
@ -30,6 +30,7 @@ public class RoutingHelper {
|
|||
public void routeWasCancelled();
|
||||
}
|
||||
|
||||
private final double DISTANCE_TO_USE_OSMAND_ROUTER = 20000;
|
||||
|
||||
private List<IRouteInformationListener> listeners = new ArrayList<IRouteInformationListener>();
|
||||
|
||||
|
@ -419,7 +420,21 @@ public class RoutingHelper {
|
|||
}
|
||||
|
||||
public void calculateRoute(final Location start, final LatLon end, final List<Location> currentGPXRoute){
|
||||
final RouteService service = OsmandSettings.getRouterService(OsmandSettings.getPrefs(context));
|
||||
if(start == null || end == null){
|
||||
return;
|
||||
}
|
||||
|
||||
// temporary check while osmand offline router is not stable
|
||||
RouteService serviceToUse= OsmandSettings.getRouterService(OsmandSettings.getPrefs(context));
|
||||
if (serviceToUse == RouteService.OSMAND && !OsmandSettings.isOsmandRoutingServiceUsed(context)) {
|
||||
double distance = MapUtils.getDistance(end, start.getLatitude(), start.getLongitude());
|
||||
if (distance > DISTANCE_TO_USE_OSMAND_ROUTER) {
|
||||
showMessage(context.getString(R.string.osmand_routing_experimental));
|
||||
serviceToUse = RouteService.CLOUDMADE;
|
||||
}
|
||||
}
|
||||
final RouteService service = serviceToUse;
|
||||
|
||||
if(currentRunningJob == null){
|
||||
// do not evaluate very often
|
||||
if (System.currentTimeMillis() - lastTimeEvaluatedRoute > evalWaitInterval) {
|
||||
|
|
|
@ -117,6 +117,7 @@ public class SettingsActivity extends PreferenceActivity implements OnPreference
|
|||
new BooleanPreference(OsmandSettings.DEBUG_RENDERING_INFO, OsmandSettings.DEBUG_RENDERING_INFO_DEF),
|
||||
new BooleanPreference(OsmandSettings.USE_STEP_BY_STEP_RENDERING, OsmandSettings.USE_STEP_BY_STEP_RENDERING_DEF),
|
||||
new BooleanPreference(OsmandSettings.FAST_ROUTE_MODE, OsmandSettings.FAST_ROUTE_MODE_DEF),
|
||||
new BooleanPreference(OsmandSettings.USE_OSMAND_ROUTING_SERVICE_ALWAYS, OsmandSettings.USE_OSMAND_ROUTING_SERVICE_ALWAYS_DEF),
|
||||
};
|
||||
private BroadcastReceiver broadcastReceiver;
|
||||
|
||||
|
|
BIN
config/logo/icon_32.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
config/logo/icon_48.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
config/logo/icon_512.png
Normal file
After Width: | Height: | Size: 157 KiB |
BIN
config/logo/icon_72.png
Normal file
After Width: | Height: | Size: 6 KiB |