This report is based on Android version - assuming this is Android-specific (looks like that from the code), seems hard to fix. Apparently should call invalidateOptionsMenu() but can't find a way to do that.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hmm, though it might be that the target Android SDK version in the J2MEPolish is as low as 3, which is Android 1.5. This means that GpsMid is installed so many backwards-compatibility features may be switched on, so in practice it apparently uses a very low level API. But tried with targeting level 11 & setting minsdk to 11, and it doesn't help, though it changes appearance of GpsMid.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
.. not just the label, also it can't be used for disconnecting.
Once there were both entries in the menu, connect & disconnect. Cant find out how that happened.
This report is based on Android version - assuming this is Android-specific (looks like that from the code), seems hard to fix. Apparently should call invalidateOptionsMenu() but can't find a way to do that.
invalidateOptionsMenu() appears to be only from api level 11, I think that's be higher than what GpsMid is built for by default.
Workaround for GPS toggle is long tap on solution string.
http://stackoverflow.com/questions/7878957/how-to-make-a-conditional-invalidateoptionsmenu-call-depending-on-the-api-leve may help
Looks to me (from net.sources and J2MEpolish source) that it should work like this - but it doesn't.
diff --git a/src/de/ueller/gpsmid/ui/Trace.java b/src/de/ueller/gpsmid/ui/Trace.java
index d1f8f29..99c8739 100644
--- a/src/de/ueller/gpsmid/ui/Trace.java
+++ b/src/de/ueller/gpsmid/ui/Trace.java
@@ -979,6 +979,9 @@ CompassReceiver, Runnable , GpsMidDisplayable, CompletionListener, IconActionPer
logger.debug("rm connect, add disconnect");
removeCommand(CMDS[CONNECT_GPS_CMD]);
addCommand(CMDS[DISCONNECT_GPS_CMD]);
+ //#if polish.android
+ MidletBridge.getInstance().invalidateOptionsMenu();
+ //#endif
//#debug info
logger.info("end startLocationPovider thread");
// setTitle("lp="+Configuration.getLocationProvider() + " " + Configuration.getBtUrl());
@@ -4554,6 +4557,9 @@ CompassReceiver, Runnable , GpsMidDisplayable, CompletionListener, IconActionPer
running = false;
notify();
addCommand(CMDS[CONNECT_GPS_CMD]);
+ //#if polish.android
+ MidletBridge.getInstance().invalidateOptionsMenu();
+ //#endif
// addCommand(START_RECORD_CMD);
//#debug info
logger.info("end locationDecoderEnd");
Hmm, though it might be that the target Android SDK version in the J2MEPolish is as low as 3, which is Android 1.5. This means that GpsMid is installed so many backwards-compatibility features may be switched on, so in practice it apparently uses a very low level API. But tried with targeting level 11 & setting minsdk to 11, and it doesn't help, though it changes appearance of GpsMid.