Android Open Source - javainstaller Path Receiver

From Project

Back to project page javainstaller.


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.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;

public class PathReceiver extends BroadcastReceiver {

  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");
      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);


Java Source Code List