Exemple #1
0
 public String getEnv(String theKey) {
   if (_myEnvironmentVariables.containsKey(theKey)) {
     return _myEnvironmentVariables.get(theKey);
   }
   AC_Log.error("environment variable '" + theKey + "' not found");
   return "";
 }
Exemple #2
0
 public void init(Bundle theExtras) {
   if (theExtras != null) {
     String myEnvVar = theExtras.getString("env_0");
     for (int i = 1; myEnvVar != null; ++i) {
       String[] myKeyValue = myEnvVar.split("=");
       String myKey = (myKeyValue.length > 0) ? myKeyValue[0] : "";
       String myValue = (myKeyValue.length > 1) ? myKeyValue[1] : "";
       AC_Log.info("found env " + myKey + " , " + myValue);
       if (myValue != "") {
         _myEnvironmentVariables.put(myKey, myValue);
         NativeBinding.putEnv(myEnvVar);
       }
       myEnvVar = theExtras.getString("env_" + i);
     }
   }
 }