diff --git a/ReadMe.txt b/ReadMe.txt index da40a13..6bbd25e 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -58,7 +58,7 @@ NOT WORKING YET CHANGES -Version 1.4 (2019-06-xx) +Version 1.4 (2019-06-08) - Add an optional menu button in the top left corner. - 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. - Add a volume slider in the settings. - Add a rotation option. +- Warn the user about the KML folder selection if this is Android < 5.0 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 -- 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. - The clock seems unsynchronized sometimes - Add KML script loading dependencies fallback to the inner ROM (and may be KML include?) diff --git a/app/src/main/assets/ReadMe.txt b/app/src/main/assets/ReadMe.txt index 5147d52..263a9c4 100644 --- a/app/src/main/assets/ReadMe.txt +++ b/app/src/main/assets/ReadMe.txt @@ -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. 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. 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. 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. @@ -58,7 +58,7 @@ NOT WORKING YET CHANGES -Version 1.4 (2019-05-xx) +Version 1.4 (2019-06-08) - Add an optional menu button in the top left corner. - 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. - Add a volume slider in the settings. - Add a rotation option. +- Warn the user about the KML folder selection if this is Android < 5.0 Version 1.3 (2019-04-04) @@ -124,7 +125,7 @@ Version 1.0 (2019-02-28) 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 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. @@ -132,4 +133,4 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Note: some included files are not covered by the GPL; these include ROM image files (copyrighted by HP), KML files and faceplate images (copyrighted by their authors). -The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this application with the kind permission of Eric Rechlin. +The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this application with the kind permission of Eric Rechlin. \ No newline at end of file diff --git a/app/src/main/java/org/emulator/forty/eight/MainActivity.java b/app/src/main/java/org/emulator/forty/eight/MainActivity.java index c343cf1..b2505bb 100644 --- a/app/src/main/java/org/emulator/forty/eight/MainActivity.java +++ b/app/src/main/java/org/emulator/forty/eight/MainActivity.java @@ -7,7 +7,6 @@ import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; import android.content.res.AssetManager; import android.graphics.Bitmap; import android.graphics.Color; @@ -812,8 +811,18 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On @Override public void onClick(DialogInterface dialog, int which) { if(which == lastIndex) { - 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); + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) { // < API 21 + 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) { // Reset to default KML folder SharedPreferences.Editor editor = sharedPreferences.edit(); diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9498000..6a55829 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -65,6 +65,8 @@ Are you sure you want to press the Reset Button? You cannot change the KML script when Emu48 is not running. Use the File, New menu item to create a new calculator. KML Script Compilation Result + Need Android 5.0 + To select the KML folder, you need at least Android version 5.0 General Authentic Calculator Speed