1 package jme3test.android;
2 
3 import android.content.pm.ActivityInfo;
4 import android.os.Bundle;
5 import com.jme3.app.AndroidHarness;
6 import com.jme3.system.android.AndroidConfigChooser.ConfigType;
7 
8 public class DemoAndroidHarness extends AndroidHarness
9 {
10     @Override
onCreate(Bundle savedInstanceState)11     public void onCreate(Bundle savedInstanceState)
12     {
13         // Set the application class to run
14         // First Extract the bundle from intent
15         Bundle bundle = getIntent().getExtras();
16 
17         //Next extract the values using the key as
18         appClass = bundle.getString("APPCLASSNAME");
19 
20 
21         String eglConfig = bundle.getString("EGLCONFIG");
22         if (eglConfig.equals("Best"))
23         {
24             eglConfigType = ConfigType.BEST;
25         }
26         else if (eglConfig.equals("Legacy"))
27         {
28             eglConfigType = ConfigType.LEGACY;
29         }
30         else
31         {
32             eglConfigType = ConfigType.FASTEST;
33         }
34 
35 
36         if (bundle.getBoolean("VERBOSE"))
37         {
38             eglConfigVerboseLogging = true;
39         }
40         else
41         {
42             eglConfigVerboseLogging = false;
43         }
44 
45 
46         exitDialogTitle = "Close Demo?";
47         exitDialogMessage = "Press Yes";
48 
49         screenOrientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
50 
51         super.onCreate(savedInstanceState);
52     }
53 
54 }
55