import android.content.*; // Intent import android.app.*; // Activity static O androidGetPermanentService() ctex { Class serviceClass = Class.forName("de.tinybrain.javax_allperms.PermanentService"); print("serviceClass: " + serviceClass); if (serviceClass == null) ret null; Context context = getAndroidContext(); print("Context: " + context); context.startService(new Intent(context, serviceClass)); print("Service should be started, looking for instance."); O service = null; for (int i = 0; i < 20*60; i++) { // 60 seconds sleep(50); service = get(serviceClass, "instance"); if (service != null) break; } if (service == null) { print("hm, no service?"); ret null; } ret service; }