How can i automatically update an android-app compiled with Berlin with new Version compiled in Tokyo?

How can i automatically update an android-app compiled with Berlin with new Version compiled in Tokyo?

Problem is that this software is an app for barcode-scanners. Normal "Download" and "Install" is not working because of changed signature from berlin to tokyo.

I can't say to all users, please uninstall old version and download the new version ... too complicated to most users ...

Marco Cantù is there no chance that the new version compiled with tokyo gets same signature ??

Comments

  1. David Nottage
    I have narrowed the problem. I'm able to correct this behavior by putting a sleep(250) after the MainActivity call.

    See unit FMX.Dialogs.Android.pas

    At line 227 and line 299, modify both procedure TFMXDialogService.MessageDialogAsync

    from
    ...
    AlertDialog := DialogFactory.createMessageDialog(MainActivity, GetNativeTheme, StringToJString(AMessage),
    Ord(ADialogType), LCaptions, PosButton, NegButton, NeutralButton);

    to

    var
    LMainActivity: JFMXNativeActivity;
    ...

    LMainActivity := MainActivity;
    Sleep(250);
    AlertDialog := DialogFactory.createMessageDialog(LMainActivity, GetNativeTheme, StringToJString(AMessage),
    Ord(ADialogType), LCaptions, PosButton, NegButton, NeutralButton);

    MainActivity is basically calling TJFMXNativeActivity.Wrap(TAndroidApplicationGlue.Current.NativeActivity.clazz). Is this call asynchronous and thus explains why messagedialog creation is failing ?

    ReplyDelete
  2. Stéphane Wierzbicki Just tested on my Lenovo TP3-710F which has Android 5.0.1 - all works OK, so I guess it may be something about Android 4 (or lower)?

    ReplyDelete

Post a Comment