#606 Command menu: label for GPS toggle is incorrect

open
nobody
Android (41)
8
2012-08-19
2012-08-19
No

After startup, when connected to GPS, the label still is about connecting to GPS, should be disconnect

Discussion

  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19

    .. not just the label, also it can't be used for disconnecting.

     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19
    • milestone: --> 3231926
     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19

    Once there were both entries in the menu, connect & disconnect. Cant find out how that happened.

     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19

    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.

     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19

    invalidateOptionsMenu() appears to be only from api level 11, I think that's be higher than what GpsMid is built for by default.

     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19

    Workaround for GPS toggle is long tap on solution string.

     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19
    • milestone: 3231926 -->
     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-19
    • priority: 5 --> 8
     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-31

    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");

     
  • Jyrki Kuoppala

    Jyrki Kuoppala - 2012-08-31

    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.

     

Log in to post a comment.