Pierre Hébert
Posted by: pierrot | on March 9, 2015
Pierre Hébert
In past you have ll direct call shortcut. Working this in extreme or trial version? Maybe can you put this to add items…
]]>
< ![CDATA[
The launcher cannot create these items alone without more permission: the shortcut must be created by the contact app (which has access to the phonebook), and sent to the launcher. The direct call permission is then used by the phone app to allow the launcher to trigger a call.
]]>
< ![CDATA[
Pierre Hébert but if you just ask the user to input a number the launcher is able to create that shortcut.
And I’m sure because I already made it (love scripting 😛 )
In theory this should work for all versions of Android.
var tel=prompt(“write the number”,””);
if(tel==null) return;
var uri = “tel:” + tel;
var intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(uri));
//LL.getContext().startActivity(intent);
LL.getEvent().getContainer().addShortcut(“Call to “+tel,intent,0,0).setDefaultIcon(LL.createImage(“android”, “sym_action_call”));
]]>
< ![CDATA[
You just have to know the number although this is not always the simplest thing (I don’t even know my wife’s phone number, lol)
]]>