diff --git a/contrib/mobile/Android/AndroidManifest.xml b/contrib/mobile/Android/AndroidManifest.xml index 1c288d7224cbe4cf3d81f8a1dde01d34f1df8c9e..022614d098d2dc75fdc019b849750a5c26556608 100644 --- a/contrib/mobile/Android/AndroidManifest.xml +++ b/contrib/mobile/Android/AndroidManifest.xml @@ -1,7 +1,9 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.geuz.onelab" android:versionCode="1" - android:versionName="1.0" > + android:versionName="1.0" + android:installLocation="preferExternal" + > <uses-feature android:glEsVersion="0x00010000" android:required="true"></uses-feature> <uses-sdk @@ -12,7 +14,10 @@ <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" - android:theme="@style/AppTheme" android:logo="@drawable/ic_launcher"> + android:theme="@style/AppTheme" + android:logo="@drawable/ic_launcher" + android:allowBackup="true" + > <activity android:name=".MainActivity" android:label="@string/title_activity_main" > @@ -21,11 +26,11 @@ <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> - <action android:name="android.intent.action.VIEW" /> - <category android:name="android.intent.category.DEFAULT" /> - <data android:scheme="file" android:host="*" android:pathPattern=".*\\.msh" android:mimeType="*/*" /> - <data android:scheme="file" android:host="*" android:pathPattern=".*\\.geo" android:mimeType="*/*" /> - <data android:scheme="file" android:host="*" android:pathPattern=".*\\.pro" android:mimeType="*/*" /> + <action android:name="android.intent.action.VIEW" /> + <category android:name="android.intent.category.DEFAULT" /> + <data android:scheme="file" android:host="*" android:pathPattern=".*\\.msh" android:mimeType="*/*" /> + <data android:scheme="file" android:host="*" android:pathPattern=".*\\.geo" android:mimeType="*/*" /> + <data android:scheme="file" android:host="*" android:pathPattern=".*\\.pro" android:mimeType="*/*" /> </intent-filter> </activity> </application> diff --git a/contrib/mobile/Android/res/drawable-mdpi/model.png b/contrib/mobile/Android/res/drawable-mdpi/model.png deleted file mode 100644 index 3a71677c81cae0c5bad62b5baa29b1c6001982e9..0000000000000000000000000000000000000000 Binary files a/contrib/mobile/Android/res/drawable-mdpi/model.png and /dev/null differ diff --git a/contrib/mobile/Android/res/drawable-mdpi/param.png b/contrib/mobile/Android/res/drawable-mdpi/param.png deleted file mode 100644 index 0103c21fe2a6bbcd3e59fa6f3ca9503cfc367e60..0000000000000000000000000000000000000000 Binary files a/contrib/mobile/Android/res/drawable-mdpi/param.png and /dev/null differ diff --git a/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java b/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java index e05a47571ceaf9e10407d6760d943b212c8d2672..06ecba2e502a2e55b20c156cabfe136791c76eb0 100644 --- a/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java +++ b/contrib/mobile/Android/src/org/geuz/onelab/MainActivity.java @@ -363,7 +363,7 @@ public class MainActivity extends Activity { StringBuilder tmp = new StringBuilder(androidName); tmp.setCharAt(androidName.lastIndexOf('_'), '.'); String nativeName = tmp.toString(); - String nativeExtension = nativeName.substring(nativeName.lastIndexOf('.')); + //String nativeExtension = nativeName.substring(nativeName.lastIndexOf('.')); /*if(new File(getFilesDir().toString()+"/"+nativeName).exists()){ //TODO check if the files are the same continue; diff --git a/contrib/mobile/androidGModel.cpp b/contrib/mobile/androidGModel.cpp index 41f84f6ec5108f115da0361d7a81f7914f8df6a5..9d6e0b499f0838675f19a4ec401c45c08089f6a7 100644 --- a/contrib/mobile/androidGModel.cpp +++ b/contrib/mobile/androidGModel.cpp @@ -109,7 +109,7 @@ JNIEXPORT jlong JNICALL Java_org_geuz_onelab_Gmsh_init Msg::SetCallback(new MobileMessage()); const char* name = env->GetStringUTFChars(jname, NULL); - return reinterpret_cast<jlong>(new drawGModel(name)); + return reinterpret_cast<jlong>(new drawGModel()); } JNIEXPORT void JNICALL Java_org_geuz_onelab_Gmsh_loadFile (JNIEnv *env, jobject obj, jlong jptr, jstring jname) diff --git a/contrib/mobile/drawGModel.cpp b/contrib/mobile/drawGModel.cpp index b3a65a843fa0cfd40c3f73f75db62bb6c458106c..db17c91566a3feb84525589dae261f0a51c93cb0 100644 --- a/contrib/mobile/drawGModel.cpp +++ b/contrib/mobile/drawGModel.cpp @@ -49,7 +49,7 @@ #include "drawGModel.h" -drawGModel::drawGModel(std::string name="None") +drawGModel::drawGModel() { new GModel(); GmshInitialize(); @@ -648,4 +648,4 @@ int onelab_cb(std::string action) return redraw; } -// vim:set ts=2: \ No newline at end of file +// vim:set ts=2: diff --git a/contrib/mobile/drawGModel.h b/contrib/mobile/drawGModel.h index ce71ef43c904c6258541e3a490356d5ee1394a94..0421e4ef89f9d4143497a5a743596c21627dada4 100644 --- a/contrib/mobile/drawGModel.h +++ b/contrib/mobile/drawGModel.h @@ -17,7 +17,6 @@ private: float _scale[3]; int width, height; double left, right, top, bottom; - float ratio; float _rotate[3]; bool _gradiant, // show the background gradiant _showGeom, // show the Geometry @@ -30,7 +29,6 @@ private: public: drawGModel(); - drawGModel(std::string name); ~drawGModel(){} void load(std::string filename); void setTranslation(float tx, float ty, float tz=0); diff --git a/contrib/mobile/utils/onelab_android.sh b/contrib/mobile/utils/onelab_android.sh index 465b428e7dd0b4e48424ff82813d28c016923198..bcf05ce710b323a5cef7caf378b813b117ee89f2 100644 --- a/contrib/mobile/utils/onelab_android.sh +++ b/contrib/mobile/utils/onelab_android.sh @@ -29,7 +29,7 @@ if [ ! -d "gmsh.android" ]; then mkdir gmsh.android; fi if [ ! -d "getdp.android" ]; then mkdir getdp.android; fi if [ ! -d "onelab.android" ]; then mkdir onelab.android; fi if [ ! -f "petsc.android/libpetsc.so" ] || [ ! -f "petsc.android/libf2clapack.so" ] || [ ! -f "petsc.android/libf2cblas.so" ]; then - echo "ERROR: petsc.android/lib do not exist or is incomplete (need blas, lapack and petsc)" + echo "ERROR: petsc.android do not exist or is incomplete (need blas, lapack and petsc)" exit 1 fi