Android Open Source - javainstaller Path Receiver






From Project

Back to project page javainstaller.

License

The source code is released under:

GNU General Public License

If you think the Android project javainstaller listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package julianwi.javainstaller;
/*from   w  w w.  j  av  a 2s  .com*/
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

public class PathReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    String action = intent.getAction();
    if (action.equals("jackpal.androidterm.broadcast.APPEND_TO_PATH")) {
      SharedPreferences settings = context.getSharedPreferences("julianwi.javainstaller_preferences", 1);
      String pref = settings.getString("broadcast", "if jamvm is installed");
      String javapath = context.getSharedPreferences("settings", 1).getString("path5", "/data/data/julianwi.javainstaller/javafiles");
      System.out.println(pref);
      if (pref.equals("on") || (pref.equals("if jamvm is installed") && new Checkforfile().checkfile(javapath))){
        Bundle result = getResultExtras(true);
        String path = settings.getString("broadcastpath", "/data/data/julianwi.javainstaller");
        System.out.println("path: " + path);
              result.putString(context.getPackageName(), path);
              setResultCode(Activity.RESULT_OK);
      }
        }
  }

}




Java Source Code List

gnu.java.lang.management.VMRuntimeMXBeanImpl.java
julianwi.javainstaller.ChangePath.java
julianwi.javainstaller.CheckPoint.java
julianwi.javainstaller.Checkforfile.java
julianwi.javainstaller.ChecklistAdapter.java
julianwi.javainstaller.Download.java
julianwi.javainstaller.Error.java
julianwi.javainstaller.InstallActivity.java
julianwi.javainstaller.InstallList.java
julianwi.javainstaller.MainActivity.java
julianwi.javainstaller.MainList.java
julianwi.javainstaller.PathReceiver.java
julianwi.javainstaller.RunActivity.java
julianwi.javainstaller.SettingsActivity.java
julianwi.javainstaller.Update.java