Skip to content
Snippets Groups Projects
Commit 005eb983 authored by Maxime Graulich's avatar Maxime Graulich
Browse files

Associate geo, msh and pro files extension

parent e8354ddf
No related branches found
No related tags found
No related merge requests found
......@@ -20,13 +20,14 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="*" android:host="*" android:pathPattern=".*\\.geo" android:mimeType="text/plain" />
</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="*/*" />
</intent-filter>
</activity>
</application>
</manifest>
\ No newline at end of file
</manifest>
......@@ -92,16 +92,22 @@ public class MainActivity extends Activity {
pager.setCurrentItem(0);
layout.addView(pager);
dialogBuilder = new AlertDialog.Builder(this);
Intent intent = getIntent();
gmsh = new Gmsh("", mainHandler);
modelList = new Models();
getModels();
loadNative();
if(modelList.size() > 0){
if(intent.getAction().equals(Intent.ACTION_VIEW)) {
String tmp = intent.getData().getPath();
gmsh.load(tmp);
}
else if(modelList.size() > 0){
model = 0;
String tmp = getFilesDir()+ "/" + modelList.getFile(model);
gmsh.load(tmp);
}
}
setContentView(layout);
}
......
......@@ -48,6 +48,8 @@ class MobileMessage : public GmshMessage
env->CallVoidMethod(gCallbackObject, mid, jstr);
env->DeleteLocalRef(jstr);
env->DeleteLocalRef(jClass);
LOGE("%s", message.c_str());
return;
}
else if(level == "Progress")
{
......@@ -67,6 +69,7 @@ class MobileMessage : public GmshMessage
env->CallVoidMethod(gCallbackObject, mid, jstr);
env->DeleteLocalRef(jstr);
env->DeleteLocalRef(jClass);
return;
}
else if(level == "RequestRender")
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment