- Version 1.4

- Warn the user about the KML folder selection if this is Android < 5.0
This commit is contained in:
dgis 2019-06-08 22:26:46 +02:00
parent 556b9d6489
commit 0647722bdd
4 changed files with 22 additions and 11 deletions

View file

@ -58,7 +58,7 @@ NOT WORKING YET
CHANGES CHANGES
Version 1.4 (2019-06-xx) Version 1.4 (2019-06-08)
- Add an optional menu button in the top left corner. - Add an optional menu button in the top left corner.
- Add a RAM card generator for the port 2 of the HP48SX and HP48GX. - Add a RAM card generator for the port 2 of the HP48SX and HP48GX.
@ -70,6 +70,7 @@ Version 1.4 (2019-06-xx)
- Prevent to load/save object and copy/paste with HP39/40. - Prevent to load/save object and copy/paste with HP39/40.
- Add a volume slider in the settings. - Add a volume slider in the settings.
- Add a rotation option. - Add a rotation option.
- Warn the user about the KML folder selection if this is Android < 5.0
Version 1.3 (2019-04-04) Version 1.3 (2019-04-04)
@ -137,8 +138,6 @@ The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this appli
TODO TODO
- Warn the user about the KML folder selection if this is Android < 5.0
- Disable the Restore after loading a new state file.
- Improve the swipe gesture. - Improve the swipe gesture.
- The clock seems unsynchronized sometimes - The clock seems unsynchronized sometimes
- Add KML script loading dependencies fallback to the inner ROM (and may be KML include?) - Add KML script loading dependencies fallback to the inner ROM (and may be KML include?)

View file

@ -4,7 +4,7 @@ WARNING: WITH VERSION 1.3, THE STATUS FILE HAS BEEN MODIFIED AND IS NOW FULLY CO
HOWEVER, BEFORE THE UPDATE, BACK UP YOUR DATA BECAUSE YOU COULD LOSE THEM. HOWEVER, BEFORE THE UPDATE, BACK UP YOUR DATA BECAUSE YOU COULD LOSE THEM.
This project ports the Windows application Emu48 written in C to Android. This project ports the Windows application Emu48 written in C to Android.
It uses the Android NDK. The former Emu48 source code remains untouched because of a thin win32 emulation layer above Linux/NDK! It uses the Android NDK. The former Emu48 source code (written by Sébastien Carlier and Christoph Giesselink) remains untouched because of a thin win32 emulation layer above Linux/NDK!
This win32 layer will allow to easily update from the original Emu48 source code. This win32 layer will allow to easily update from the original Emu48 source code.
It can open or save the exact same state files (state.e48/e49) than the original Windows application! It can open or save the exact same state files (state.e48/e49) than the original Windows application!
@ -20,7 +20,7 @@ QUICK START
1. From the left side, slide your finger to open the menu. 1. From the left side, slide your finger to open the menu.
2. Touch the "New..." menu item. 2. Touch the "New..." menu item.
3. Select a predefined faceplate (or select a custom KML script folder). 3. Select a predefined faceplate (or select a custom KML script folder with Android >= 5.0).
4. And the calculator should now be opened. 4. And the calculator should now be opened.
@ -58,7 +58,7 @@ NOT WORKING YET
CHANGES CHANGES
Version 1.4 (2019-05-xx) Version 1.4 (2019-06-08)
- Add an optional menu button in the top left corner. - Add an optional menu button in the top left corner.
- Add a RAM card generator for the port 2 of the HP48SX and HP48GX. - Add a RAM card generator for the port 2 of the HP48SX and HP48GX.
@ -70,6 +70,7 @@ Version 1.4 (2019-05-xx)
- Prevent to load/save object and copy/paste with HP39/40. - Prevent to load/save object and copy/paste with HP39/40.
- Add a volume slider in the settings. - Add a volume slider in the settings.
- Add a rotation option. - Add a rotation option.
- Warn the user about the KML folder selection if this is Android < 5.0
Version 1.3 (2019-04-04) Version 1.3 (2019-04-04)
@ -124,7 +125,7 @@ Version 1.0 (2019-02-28)
LICENSES LICENSES
Android version by Régis COSNIER. Android version by Régis COSNIER.
This program is based on Emu48 for Windows version, copyrighted by Christoph Gießelink & Sébastien Carlier, with the addition of a win32 layer to run on Android. This program is based on Emu48 for Windows version, copyrighted by Christoph Gießelink & Sébastien Carlier, with the addition of a win32 layer to run on Android.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

View file

@ -7,7 +7,6 @@ import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.ActivityInfo;
import android.content.res.AssetManager; import android.content.res.AssetManager;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Color; import android.graphics.Color;
@ -812,8 +811,18 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
if(which == lastIndex) { if(which == lastIndex) {
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { // < API 21
startActivityForResult(intent, changeKML ? INTENT_PICK_KML_FOLDER_FOR_CHANGING : INTENT_PICK_KML_FOLDER_FOR_NEW_FILE); new AlertDialog.Builder(MainActivity.this)
.setTitle(getString(R.string.message_kml_folder_selection_need_api_lollipop))
.setMessage(getString(R.string.message_kml_folder_selection_need_api_lollipop_description))
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
}).show();
} else {
Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
startActivityForResult(intent, changeKML ? INTENT_PICK_KML_FOLDER_FOR_CHANGING : INTENT_PICK_KML_FOLDER_FOR_NEW_FILE);
}
} else if(which == lastIndex + 1) { } else if(which == lastIndex + 1) {
// Reset to default KML folder // Reset to default KML folder
SharedPreferences.Editor editor = sharedPreferences.edit(); SharedPreferences.Editor editor = sharedPreferences.edit();

View file

@ -65,6 +65,8 @@
<string name="message_press_reset">Are you sure you want to press the Reset Button?</string> <string name="message_press_reset">Are you sure you want to press the Reset Button?</string>
<string name="message_change_kml">You cannot change the KML script when Emu48 is not running. Use the File, New menu item to create a new calculator.</string> <string name="message_change_kml">You cannot change the KML script when Emu48 is not running. Use the File, New menu item to create a new calculator.</string>
<string name="message_kml_script_compilation_result">KML Script Compilation Result</string> <string name="message_kml_script_compilation_result">KML Script Compilation Result</string>
<string name="message_kml_folder_selection_need_api_lollipop">Need Android 5.0</string>
<string name="message_kml_folder_selection_need_api_lollipop_description">To select the KML folder, you need at least Android version 5.0</string>
<string name="settings_category_general_title">General</string> <string name="settings_category_general_title">General</string>
<string name="settings_realspeed_title">Authentic Calculator Speed</string> <string name="settings_realspeed_title">Authentic Calculator Speed</string>