Stany Freres
now browsing by tag
Is it possible to link an event to an Item (shortcut, Panel, Folder, …) in a script ?
For example: I’m creating shortcuts in a script and I would like to associate an event (eg. call another script with specific parameters) when the shortcut is ‘long tapped’. Is this possible ?
Thanks in advance for your help!
]]>Hi
I’m looking for help.
I would like to create shortcuts to my recent contacts in a script. Using tasker and AutoContact, I’m able to build a JSON array containing the contact ID and contact name of the 10 last recent contacts.
The goal is to iterate this JSON array in a script that would build a list of shortcuts to open these contacts and add them in a Panel.
Part of the script I’m using to create the shortcut based on the contact ID:
var contactID = “207”; //to be iterated
var contactName = “My Contact”; //to be iterated
var intent = Intent.parseUri(“content://com.android.contacts/contacts/” + contactID + “#Intent;action=android.provider.action.QUICK_CONTACT;type=vnd.android.cursor.item/contact;launchFlags=0x10018000;B.com.android.launcher.intent.extra.shortcut.INGORE_LAUNCH_ANIMATION=true;end”,0);
var addedShortcut = myPanel.getContainer().addShortcut(contactName ,intent,0,0);
It works fine: the shortcut is created and it opens the contact but I need help to retrieve the icon that corresponds to the contact: sometimes it is a picture, somtimes it is a material icon representing the first letter of the contact name. Any idea how I could achieve this ?
Any hint/idea is welcome!
]]>Installed the new version of Lightning Launcher yesterday.
Installed the new version of Lightning Launcher yesterday.
I use a lot of scripting and it seems to crash now.
Previously, I used the method “LL.getAllDesktops()” and it worked fine. Now, LL crashes when I try to access the result of this function. I tried to use “getConfiguration().getAllDesktops()” instead since I saw that LL was deprecated, but LL keeps crashing.
Can someone please help me ?
Here is a preview of my code:
var dTab=getConfiguration().getAllDesktops();
var i=0,myCurrentDesktop=”default”;
myCurrentDesktop = getVariables().getString(“myCurrentDesktop”);
alert(myCurrentDesktop); // the correct value is displayed when I run the script
alert(dTab.getLength().toString()); // LL crashes without displaying this value. It crashes also if this line is removed
for(i=0;i { var id=dTab.getAt(i) ; if(getContainerById(id).getName() == myCurrentDesktop) { getHomeScreen().goToDesktop(id); return; } } getHomeScreen().goToDesktop(getConfiguration().getHomeDesktopId());
Hi LLX users
Hi LLX users,
I would like to configure a script to associate with the home button.
This script should toggle between the default action “Go to home desktop, then zoom 100p” and, if I’m already on the home desktop, it should start google now instead.
I already figured out the code to start google now, but I don’t know how to detect whether I’m on the home desktop or whether an application is opened.
I checked the PropertySet, but couldn’t find any property that could help me.
I also tried to read the result of the Container.getView() method, but couldn’t find any doc about it.
Any help/hint/suggestion would be appreciated!
Hi
Hi,
There seem to be a problem with the Gmail badge : I can’t set any value in “Gmail label” property (it’s just displaying a blank message box with a cancel button when I select the property).
I also experienced multiple Lightning Launcher crashes when trying to change the settings of this badge.
I have Android 6 and my device is a non rooted LG G3.
Is there something that I’m doing wrong ?
Thanks in advance for your help!