**This is an old revision of the document!** ----
**//This is only a preview. The Repository Importer is not yet avialable.//** In the Activity which wants to import a script add: <sxh java;>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Intent intent = getIntent(); if(intent.hasExtra("loadedScriptId")){ int id = intent.getIntExtra("loadedScriptId",-1); //do something with the ID } else{ //do normal create } } void loadScript(String code,String name,int flags){ Intent intent = new Intent("net.pierrox.lightning_launcher.script.IMPORT"); List<ResolveInfo> list = getPackageManager().queryIntentServices(intent, PackageManager.MATCH_DEFAULT_ONLY); if(list.size()==0) { new AlertDialog.Builder(this) .setTitle("Repository Importer missing") .setMessage("This action requires the Repository Importer to be installed. Do you wish to install it?") .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); } }) .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.dismiss(); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.trianguloy.llscript.repository"))); } }); } else { intent.putExtra("code",code); intent.putExtra("name",name); intent.putExtra("flags",flags); intent.putExtra("receiver",getComponentName().flattenToString()); startService(intent); } } void runScript(int id, String data){ Intent i = new Intent(Intent.ACTION_VIEW); i.setComponent(ComponentName.unflattenFromString("net.pierrox.lightning_launcher_extreme/net.pierrox.lightning_launcher.activities.Dashboard")); i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); i.putExtra("a", 35); i.putExtra("d", id + "/" + data); startActivity(i); } </sxh> In your AndroidManifest.xml: <sxh XML;> <uses-permission android:name="net.pierrox.lightning_launcher.IMPORT_SCRIPTS"/> </sxh> Then you can simply call loadScript in your Activity with valid data to install the script and with the retrieved is you can call runScript to run that script. This requires the Repository Importer to be installed on the device.