now browsing by tag

 
 

I’m not a friend of tasker.

I’m not a friend of tasker.

I merely tent to this app to automate things: automagic – a swiss knife with very good GUI.

Is it possible to use Taskerintent to trigger Flows in automagic or could we get a extension in LL to trigger AutomagicIntents?

var i = new AutomagicIntent(“Say”);

LL.sendAutomagicIntent(i, true);

http://automagic4android.com/de/hilfe
]]>

setTimeout()

setTimeout()

who knows how the function works, especialy when switching off the display?

I have set a

setTimeout(“callback”,30*60*1000).   // 30 Minutes

When the phones display is off the timer is not fired.

How can i get a more reliable solution?

]]>

Is there more comfortable way to edit scripts – telnet or by remotely editing from a linux system?

Is there more comfortable way to edit scripts – telnet or by remotely editing from a linux system?

The work is a little bit hard, editing directly on the phone.

at the moment i send the script from a PC to the phone.

]]>

Timers

Timers

It is possible to set timers using setTimeout. Pay special attention to clear these timers when needed, LL won’t do this for you. If you don’t clear timers, you may severly increase CPU use and battery consumption.

I have created a timer with setTimeout for 5 Minutes.

When i switched off the display the timer is not executed in deep sleep mode. I expected that the CPU would have been awoken after the specified time to execute some things and sleep after that.

is that right?

When the display is switched on again the timer seemd to be executed after a time.

Can someone explain whats going on behind the curtains?

the Code:

LL.bindClass(“android.provider.Settings”);

var myItem = LL.getEvent().getItem();

var myId   = myItem.getId();

function setTimeout15Seconds() {

   Settings.System.putInt(LL.getContext().getContentResolver(),Settings.System.SCREEN_OFF_TIMEOUT,15*1000);

   Android.makeNewToast(“setting timeout to 15 sec”,true).show();

   myItem.setTag(“timeout”, 0);

}    

function setTimeout5Minutes() {

  var timeout = myItem.getTag(“timeout”)||0;

  if (timeout == 0) {

    Settings.System.putInt(LL.getContext().getContentResolver(),Settings.System.SCREEN_OFF_TIMEOUT,5*60*1000);

    myItem.setTag(“timeout”, setTimeout(setTimeout15Seconds, 5*60*1000));

    Android.makeNewToast(“setting timeout to 5 min”,true).show();

  }  

}

setTimeout5Minutes();

]]>

i want to change the “DiSPLAY TIMEOUT”  from scripting.

i want to change the “DiSPLAY TIMEOUT”  from scripting. I found that it should work with somethinthing like “android.provider.Settings.System.putInt(getContentResolver(),

            Settings.System.SCREEN_OFF_TIMEOUT, time);”

how should be done in LL

]]>

Hi

Hi

sometimes my LL crashes. What my be the reason?:

10-31 19:53:59.873 E/InputEventReceiver(1992): Exception dispatching input event.

10-31 19:53:59.873 E/MessageQueue-JNI(1992): Exception in MessageQueue callback: handleReceiveCallback

10-31 19:53:59.874 E/MessageQueue-JNI(1992): java.lang.IllegalArgumentException: Receiver not registered: android.widget.TextClock$2@126423dd

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.app.LoadedApk.forgetReceiverDispatcher(LoadedApk.java:766)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.app.ContextImpl.unregisterReceiver(ContextImpl.java:1697)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:517)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.content.ContextWrapper.unregisterReceiver(ContextWrapper.java:517)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.widget.TextClock.unregisterReceiver(TextClock.java:538)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.widget.TextClock.onDetachedFromWindow(TextClock.java:506)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.View.dispatchDetachedFromWindow(View.java:13576)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2835)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4221)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4194)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.removeView(ViewGroup.java:4125)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.views.ItemLayout.v(ItemLayout.java:487)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.views.ItemLayout.a(ItemLayout.java:424)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.overlay.WindowService.a(WindowService.java:374)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.overlay.WindowService.f(WindowService.java:833)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.overlay.WindowService.g(WindowService.java:47)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.overlay.c.onTouch(WindowService.java:494)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.View.dispatchTouchEvent(View.java:8474)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2406)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2050)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at net.pierrox.lightning_launcher.overlay.b.dispatchTouchEvent(WindowService.java:180)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2586)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.View.dispatchPointerEvent(View.java:8675)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4129)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3995)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3603)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3569)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3686)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3577)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3743)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3550)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3603)

10-31 19:53:59.874 E/MessageQueue-JNI(1992):     at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3569)

]]>

LL.bindClass(“android.net.ConnectivityManager”);

LL.bindClass(“android.net.ConnectivityManager”);

var cm=LL.getContext().getSystemService(Context.CONNECTIVITY_SERVICE);

var i = null;

var wifi = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);

if (wifi.isConnected()) {

i = pm.getLaunchIntentForPackage(“com.opera.browser”);

} else {

i = pm.getLaunchIntentForPackage(“org.mozilla.firefox”);

}

LL.startActivity(i);

Any idea??? 

]]>

is there a way to explicitly start firefox or opera browser depending on the status  of wifi by scripting.

is there a way to explicitly start firefox or opera browser depending on the status  of wifi by scripting.

Firefox is my favourite browser when using mobile internet, because of the good blocking feature of images.

]]>

I want to lern myself  scripting in ll and have mastered the first examples.

I want to lern myself  scripting in ll and have mastered the first examples.

With the following code I intend to call a script by tapping an icon and the email app is called with a fixed receiver.

But it will not work anyway with handing over of the receiver list:

#####################################

var emailIntent = new Intent(Intent.ACTION_SEND);

emailIntent.setData(Uri. fromParts(“mailto:”, “xxx.xxx@web.de”, null));

emailIntent.setType(“text/plain”);

adr = [“xxx.yyy@web.de”];

emailIntent.putExtra(Intent.EXTRA_EMAIL , adr );

emailIntent.putExtra(Intent.EXTRA_SUBJECT, “von meinem Handy verschickt”);

LL.startActivity(emailIntent );

##############################

What am I doing wrong? The subject comes anyway.

]]>