!752 import android.content.*; // Intent import android.app.*; // Activity p { Class serviceClass = Class.forName("de.tinybrain.javax_allperms.PermanentService"); print("serviceClass: " + serviceClass); if (serviceClass == null) ret; Activity 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("woot no service?"); ret; } Thread thread = new Thread("Phone Bot") { public void run() { for (int i = 0; i < 3; i++) { sayInWebChat("Phone Bot", "I am running on Android! " + unixSeconds()); sleepSeconds(60); } } }; call(service, "addThread", thread); print("Thread added! Check web chat..."); }