bugfix and voice information
git-svn-id: https://osmand.googlecode.com/svn/trunk@343 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
7a7f6ad6eb
commit
d9633834f5
8 changed files with 58 additions and 25 deletions
|
@ -16,28 +16,23 @@ public class ToDoConstants {
|
||||||
|
|
||||||
// TODO ANDROID
|
// TODO ANDROID
|
||||||
// for 0.3
|
// for 0.3
|
||||||
// 60. Audio guidance for routing !
|
|
||||||
// 68. Implement service to app work with screen offline
|
// 68. Implement service to app work with screen offline
|
||||||
// (introduce special settings how often update location to monitoring & audio guidance)
|
// (introduce special settings how often update location to monitoring & audio guidance & add new item to status bar)
|
||||||
// Improvement : Show stops in the transport route on the map
|
// Improvement : Show stops in the transport route on the map
|
||||||
// Improvement : redesign poi selecting (show on map )
|
// Improvement : redesign poi selecting (show on map )
|
||||||
/// Better : improve zooming (better zoom out)
|
/// Better : improve zooming (better zoom out)
|
||||||
// Add menu mute for voice
|
|
||||||
// BUG with search area for poi/transport bounds region
|
|
||||||
// BUG with foot navigation (unavailable for cloudmade)
|
|
||||||
// BUG animated move more precise check final location
|
// BUG animated move more precise check final location
|
||||||
// BUG turn concatenation
|
// BUG 9!
|
||||||
/// BUG Settings for osm bug creator name (save)
|
// BUG delete file if download failed !!! (check it)
|
||||||
// BUG 9
|
// BUG add button show my location
|
||||||
|
// TODO update site with voice information
|
||||||
// 69. Add phone information to POI
|
// 43. Enable poi filter by name (find lake by name or shop) - case sensitive search DB - make only search filter (on UI)!
|
||||||
|
|
||||||
|
|
||||||
// Not clear if it is really needed
|
// Not clear if it is really needed
|
||||||
// 43. Enable poi filter by name (find lake by name or shop) - case sensitive search DB - make only search filter (on UI)!
|
// 69. Add phone information to POI
|
||||||
// 45. Get clear <Use internet> settings. Move that setting on top settings screen.
|
// 70. Show building numbers over map
|
||||||
// That setting should rule all activities that use internet. It should ask whenever internet is used
|
|
||||||
// (would you like to use internet for that operation - if using internet is not checked).
|
|
||||||
// Internet using now for : edit POI osm, show osm bugs layer, download tiles.
|
|
||||||
|
|
||||||
// Unscheduled (complex)
|
// Unscheduled (complex)
|
||||||
// 66. Transport routing (show next stop, total distance, show stop get out) (?).
|
// 66. Transport routing (show next stop, total distance, show stop get out) (?).
|
||||||
|
@ -59,12 +54,17 @@ public class ToDoConstants {
|
||||||
// BUGS Swing
|
// BUGS Swing
|
||||||
|
|
||||||
// DONE ANDROID :
|
// DONE ANDROID :
|
||||||
|
// 45. Get clear <Use internet> settings. Move that setting on top settings screen.
|
||||||
|
// That setting should rule all activities that use internet. It should ask whenever internet is used
|
||||||
|
// (would you like to use internet for that operation - if using internet is not checked).
|
||||||
|
// Internet using now for : edit POI osm, show osm bugs layer, download tiles - not needed.
|
||||||
|
// 58. Upload/Download zip-index from site & unzip them on phone
|
||||||
|
// 69. Multitouch zoom, animated zoom, animate map shift (when select some point to see)!
|
||||||
|
// 60. Audio guidance for routing !
|
||||||
// 61. Provide route information for YOURS (calclate turns/angle/expected time)
|
// 61. Provide route information for YOURS (calclate turns/angle/expected time)
|
||||||
// Fix some missing turns in CloudMade (for secondary roads wo name). Add them (if dist to prev/next turn > 150m) [dacha] !
|
// Fix some missing turns in CloudMade (for secondary roads wo name). Add them (if dist to prev/next turn > 150m) [dacha] !
|
||||||
// 33. Build transport locations. Create transport index (transport-stops) (investigate)
|
// 33. Build transport locations. Create transport index (transport-stops) (investigate)
|
||||||
// Not implemented : show key/transit stops on map, follow mode (show next stop)
|
// Not implemented : show key/transit stops on map, follow mode (show next stop)
|
||||||
// 58. Upload/Download zip-index from site & unzip them on phone
|
|
||||||
// 69. Multitouch zoom, animated zoom, animate map shift (when select some point to see)!
|
|
||||||
|
|
||||||
|
|
||||||
// DONE SWING
|
// DONE SWING
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<group android:id="@+id/map_context_menu" android:menuCategory="container">
|
<group android:id="@+id/map_context_menu" android:menuCategory="container">
|
||||||
<item android:title="@string/mark_point" android:id="@+id/map_mark_point" android:icon="@android:drawable/ic_menu_mylocation"></item>
|
<item android:title="@string/mark_point" android:id="@+id/map_mark_point" android:icon="@android:drawable/ic_menu_mylocation"></item>
|
||||||
<item android:id="@+id/map_navigate_to_point" android:title="@string/stop_navigation" android:visible="false" android:icon="@android:drawable/ic_menu_close_clear_cancel"></item>
|
<item android:id="@+id/map_navigate_to_point" android:title="@string/stop_navigation" android:visible="false" android:icon="@android:drawable/ic_menu_close_clear_cancel"></item>
|
||||||
|
<item android:id="@+id/map_mute" android:title="@string/menu_mute_off" android:visible="false"></item>
|
||||||
<item android:id="@+id/map_get_directions" android:title="@string/get_directions" android:icon="@android:drawable/ic_menu_directions"></item>
|
<item android:id="@+id/map_get_directions" android:title="@string/get_directions" android:icon="@android:drawable/ic_menu_directions"></item>
|
||||||
<item android:id="@+id/map_transport" android:title="@string/transport"></item>
|
<item android:id="@+id/map_transport" android:title="@string/transport"></item>
|
||||||
<item android:id="@+id/map_show_settings" android:title="@string/settings_Button" android:icon="@android:drawable/ic_menu_preferences"></item>
|
<item android:id="@+id/map_show_settings" android:title="@string/settings_Button" android:icon="@android:drawable/ic_menu_preferences"></item>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="menu_mute_off">Без звука</string>
|
||||||
|
<string name="menu_mute_on">Звук</string>
|
||||||
<string name="voice_not_use">Не использовать</string>
|
<string name="voice_not_use">Не использовать</string>
|
||||||
<string name="voice_provider_descr">Выберите голос для маршрутизации</string>
|
<string name="voice_provider_descr">Выберите голос для маршрутизации</string>
|
||||||
<string name="voice_provider">Голосовые данные</string>
|
<string name="voice_provider">Голосовые данные</string>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="menu_mute_off">Mute off</string>
|
||||||
|
<string name="menu_mute_on">Mute</string>
|
||||||
<string name="voice_not_use">Not use</string>
|
<string name="voice_not_use">Not use</string>
|
||||||
<string name="voice_provider_descr">Choose voice data for routing</string>
|
<string name="voice_provider_descr">Choose voice data for routing</string>
|
||||||
<string name="voice_provider">Voice data</string>
|
<string name="voice_provider">Voice data</string>
|
||||||
|
|
|
@ -57,10 +57,10 @@ public class BaseLocationIndexRepository<T extends MapObject> {
|
||||||
|
|
||||||
Cursor query = db.query(tableLocation, new String[]{"MAX(latitude)", "MAX(longitude)", "MIN(latitude)", "MIN(longitude)"}, null, null,null, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
Cursor query = db.query(tableLocation, new String[]{"MAX(latitude)", "MAX(longitude)", "MIN(latitude)", "MIN(longitude)"}, null, null,null, null, null); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
|
||||||
if(query.moveToFirst()){
|
if(query.moveToFirst()){
|
||||||
dataTopLatitude = query.getDouble(0);
|
dataTopLatitude = query.getDouble(0) + 2;
|
||||||
dataRightLongitude = query.getDouble(1);
|
dataRightLongitude = query.getDouble(1) + 2.5;
|
||||||
dataBottomLatitude = query.getDouble(2);
|
dataBottomLatitude = query.getDouble(2) - 2;
|
||||||
dataLeftLongitude = query.getDouble(3);
|
dataLeftLongitude = query.getDouble(3) - 2.5;
|
||||||
}
|
}
|
||||||
query.close();
|
query.close();
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
|
|
|
@ -94,6 +94,20 @@ public class OsmandSettings {
|
||||||
return prefs.edit().putString(USER_NAME, name).commit();
|
return prefs.edit().putString(USER_NAME, name).commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// this value string is synchronized with settings_pref.xml preference name
|
||||||
|
public static final String USER_OSM_BUG_NAME = "user_osm_bug_name"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
public static String getUserNameForOsmBug(Context ctx) {
|
||||||
|
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
|
||||||
|
return prefs.getString(USER_OSM_BUG_NAME, "NoName"); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean setUserNameForOsmBug(Context ctx, String name) {
|
||||||
|
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
|
||||||
|
return prefs.edit().putString(USER_OSM_BUG_NAME, name).commit();
|
||||||
|
}
|
||||||
|
|
||||||
public static final String USER_PASSWORD = "user_password"; //$NON-NLS-1$
|
public static final String USER_PASSWORD = "user_password"; //$NON-NLS-1$
|
||||||
public static String getUserPassword(Context ctx){
|
public static String getUserPassword(Context ctx){
|
||||||
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
|
SharedPreferences prefs = ctx.getSharedPreferences(SHARED_PREFERENCES_NAME, Context.MODE_WORLD_READABLE);
|
||||||
|
|
|
@ -116,6 +116,7 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
||||||
private boolean sensorRegistered = false;
|
private boolean sensorRegistered = false;
|
||||||
|
|
||||||
private MenuItem navigateToPointMenu;
|
private MenuItem navigateToPointMenu;
|
||||||
|
private MenuItem muteMenu;
|
||||||
private NotificationManager mNotificationManager;
|
private NotificationManager mNotificationManager;
|
||||||
private Handler mapPositionHandler = null;
|
private Handler mapPositionHandler = null;
|
||||||
private int APP_NOTIFICATION_ID;
|
private int APP_NOTIFICATION_ID;
|
||||||
|
@ -747,12 +748,21 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
||||||
navigateToPointMenu.setVisible(false);
|
navigateToPointMenu.setVisible(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(muteMenu != null){
|
||||||
|
muteMenu.setTitle(routingHelper.getVoiceRouter().isMute() ? R.string.menu_mute_on : R.string.menu_mute_off);
|
||||||
|
if (routingHelper.getFinalLocation() != null && routingHelper.isFollowingMode()) {
|
||||||
|
muteMenu.setVisible(true);
|
||||||
|
} else {
|
||||||
|
muteMenu.setVisible(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
MenuInflater inflater = getMenuInflater();
|
MenuInflater inflater = getMenuInflater();
|
||||||
inflater.inflate(R.menu.map_menu, menu);
|
inflater.inflate(R.menu.map_menu, menu);
|
||||||
navigateToPointMenu = menu.findItem(R.id.map_navigate_to_point);
|
navigateToPointMenu = menu.findItem(R.id.map_navigate_to_point);
|
||||||
|
muteMenu = menu.findItem(R.id.map_mute);
|
||||||
updateNavigateToPointMenu();
|
updateNavigateToPointMenu();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -785,6 +795,10 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
||||||
} else if (item.getItemId() == R.id.map_specify_point) {
|
} else if (item.getItemId() == R.id.map_specify_point) {
|
||||||
openChangeLocationDialog();
|
openChangeLocationDialog();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (item.getItemId() == R.id.map_mute) {
|
||||||
|
routingHelper.getVoiceRouter().setMute(!routingHelper.getVoiceRouter().isMute());
|
||||||
|
updateNavigateToPointMenu();
|
||||||
|
return true;
|
||||||
} else if (item.getItemId() == R.id.map_navigate_to_point) {
|
} else if (item.getItemId() == R.id.map_navigate_to_point) {
|
||||||
if(navigationLayer.getPointToNavigate() != null){
|
if(navigationLayer.getPointToNavigate() != null){
|
||||||
if(routingHelper.getFinalLocation() != null){
|
if(routingHelper.getFinalLocation() != null){
|
||||||
|
|
|
@ -347,7 +347,7 @@ public class OsmBugsLayer implements OsmandMapLayer {
|
||||||
builder.setTitle(R.string.osb_add_dialog_title);
|
builder.setTitle(R.string.osb_add_dialog_title);
|
||||||
final View view = layoutInflater.inflate(R.layout.open_bug, null);
|
final View view = layoutInflater.inflate(R.layout.open_bug, null);
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
((EditText)view.findViewById(R.id.AuthorName)).setText(OsmandSettings.getUserName(ctx));
|
((EditText)view.findViewById(R.id.AuthorName)).setText(OsmandSettings.getUserNameForOsmBug(ctx));
|
||||||
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -355,7 +355,7 @@ public class OsmBugsLayer implements OsmandMapLayer {
|
||||||
String text = ((EditText)view.findViewById(R.id.BugMessage)).getText().toString();
|
String text = ((EditText)view.findViewById(R.id.BugMessage)).getText().toString();
|
||||||
String author = ((EditText)view.findViewById(R.id.AuthorName)).getText().toString();
|
String author = ((EditText)view.findViewById(R.id.AuthorName)).getText().toString();
|
||||||
// do not set name as author it is ridiculous in that case
|
// do not set name as author it is ridiculous in that case
|
||||||
// OsmandSettings.setUserName(ctx, author);
|
OsmandSettings.setUserNameForOsmBug(ctx, author);
|
||||||
boolean bug = createNewBug(latitude, longitude,
|
boolean bug = createNewBug(latitude, longitude,
|
||||||
text, author);
|
text, author);
|
||||||
if (bug) {
|
if (bug) {
|
||||||
|
@ -377,14 +377,14 @@ public class OsmBugsLayer implements OsmandMapLayer {
|
||||||
builder.setTitle(R.string.osb_comment_dialog_title);
|
builder.setTitle(R.string.osb_comment_dialog_title);
|
||||||
final View view = layoutInflater.inflate(R.layout.open_bug, null);
|
final View view = layoutInflater.inflate(R.layout.open_bug, null);
|
||||||
builder.setView(view);
|
builder.setView(view);
|
||||||
((EditText)view.findViewById(R.id.AuthorName)).setText(OsmandSettings.getUserName(ctx));
|
((EditText)view.findViewById(R.id.AuthorName)).setText(OsmandSettings.getUserNameForOsmBug(ctx));
|
||||||
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
builder.setNegativeButton(R.string.default_buttons_cancel, null);
|
||||||
builder.setPositiveButton(R.string.osb_comment_dialog_add_button, new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(R.string.osb_comment_dialog_add_button, new DialogInterface.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
String text = ((EditText)view.findViewById(R.id.BugMessage)).getText().toString();
|
String text = ((EditText)view.findViewById(R.id.BugMessage)).getText().toString();
|
||||||
String author = ((EditText)view.findViewById(R.id.AuthorName)).getText().toString();
|
String author = ((EditText)view.findViewById(R.id.AuthorName)).getText().toString();
|
||||||
// OsmandSettings.setUserName(ctx, author);
|
OsmandSettings.setUserNameForOsmBug(ctx, author);
|
||||||
boolean added = addingComment(bug.getId(), text, author);
|
boolean added = addingComment(bug.getId(), text, author);
|
||||||
if (added) {
|
if (added) {
|
||||||
Toast.makeText(ctx, ctx.getResources().getString(R.string.osb_comment_dialog_success), Toast.LENGTH_LONG).show();
|
Toast.makeText(ctx, ctx.getResources().getString(R.string.osb_comment_dialog_success), Toast.LENGTH_LONG).show();
|
||||||
|
|
Loading…
Reference in a new issue