Tasker allows creation of completely standalone apps (APK files) which have no requirement for Tasker to be installed on the device they're used on.
The intention is to allow people to create their own apps for fun, for sale or just to share with friends. Or if you are concerned about all the permissions Tasker needs you can create an app that has only the permissions you require!
App creation is uncomplicated and takes only a few seconds once you're setup.
To create apps, you need the following on your device (not necessarily on the device(s) the app will run on):
App creation is accessed by long-clicking on a project (not the base project) or task and selecting Export then As App. Any linked resources needed (e.g. other tasks, images) are included as part of the new app.
To export anything except a single task, you need to create a project and put anything you wish to export in the project.
To generate apps, Tasker needs a free helper app called Tasker App Factory. It's available on Play Store and from the Tasker website.
Click the accept button on the popup to install the helper app.
Tasker should now start generating your app, which will take maybe 12 seconds depending on your device.
If all goes well, the Cancel button will turn into an OK button meaning your app is ready!
We can't run the app straight away though because it hasn't been installed. Click on the rightmost bottom button with the Android icon to ask Android to install your app.
Once Android is done installing, you can click it's Open button to run the app, or you can simply go to the home screen and click on the app's icon in the launcher.
You should see a Hello World popup!
More usually, before an app is generated you will be presented with a configuration screen which lets you specify various options for the new app.
Android requires that all apps be signed i.e. that they certify who created them. By default, Tasker uses an automatically-generated insecure certificate to sign apps and doesn't bother mentioning it.
However, if you want to release an app via a public site (Play Store for example), you will need to sign it with a proper (secure) certificate. That's done so the site knows that it's you that's giving them the app each time you submit a new version.
Certificates are kept in a keystore which is protected
with a password. To generate a keystore with a secure certificate,
use Menu / More / Developer Options / Create Certificate
.
Once you've generated the keystore, Tasker will often need to ask you for the certificate password before app generation so that it can be used to sign each new version of your app.
If Android's backup service is enabled in Android settings, Tasker makes a backup of the keystore there.
Tasker also makes an automatic backup of the keystore to
/sdcard/Tasker/factory/keystore.user
when it is first created and when you backup your profile data
with Menu / Data / Backup
. It's highly advisable
to make a copy of that file and keep it safe away from your device.
Android accessibility support changed in Android 4.1 (JellyBean). If support is needed for accessibility services in 4.1+, the Minimum Android Version in the child Configuration screen must be set to 16 or higher. If support is required pre-4.1, it must be set to less than 16.
In other words, to support both pre- and post-4.1 devices, two APKs must be generated.
This applies to all features that rely on an Accessibility Service (events Notification, New Window, Button Widget Clicked, Notification Click, variables %NTITLE, %WIN, App Context from min version 20+)
Google Play Store allows publication of APKs targetting different Android versions under the same package name, however this has not been tested by the developer of Tasker.
When the specified launch task runs in the child app, the following local variables will be available to it:
Most child apps include a service which constantly monitors for events. If you know that you don't need to monitor events anymore (in-between app launches) you can use the Disable action in the Tasker category to stop it.
It will be automatically started again next time the app is launched.
Menu / Prefs / More / Factory
.
The new app does not take over any preferences from Tasker, all of the preferences in the child app are in their default state, with a couples of exceptions.
Despite the misleading name, you can use the Set Tasker Pref action in the Tasker category in the child app to change some of the child's preferences when it is running.
The Test action in the Misc category allows you to check which Tasker features are available at run time (when the app is being used).
Tip: to include a dynamic image (e.g. which you download to a file path via HTTP Get), put the image reference in a variable, and put the variable in the relevant action.
When the new app is launched, it checks that all referenced plugins are installed on the device and prompts the user to install missing ones.
Some plugins may not work on other devices if they themselves store something about the action to be performed, since that data will not be available on the other device.
Plugin authors: see also here.
/sdcard/sl4a/scripts
, prefixed with the
package name, on first run. Tasker automatically inserts the WRITE_EXTERNAL_STORAGE
permission for that purpose.
If SL4A is missing on the target device, the new app will prompt the user to download when launched.
If a new version of the app is reinstalled on the target device, the new versions of the scripts will be written if the length has changed.
The data for Maps is provided by Google and they require a maps key (v2) for each developer that uses it. If you are using Map scene elements in your app, you need a key from Google that can be included with your app.
Here are the steps to acquire a key:
Menu / More / Developer Options / Certificate Checksum
Enter the key in the App Configuration screen when generating your app. Note that the box will only be presented if your app uses one or more Map scene elements.
Note that the device on which the created app is used needs Google's Play Services APK installed, otherwise the map elements will not function.
The WAKE_LOCK permission is unfortunately always required for technical reasons.
Code for encryption is included in any app created by App Factory, however if you don't use encryption features it's unlikely to be a problem in terms of export restrictions. However, that is an opinion, it is not legal advice.
Note that code libraries for encryption are included with every Android device. Tasker (and child apps) use these libraries to perform the encryption, they do not contain encryption code themselves.
You are free to distribute and sell apps created by Tasker in any way you wish. No licence fees to the developer of Tasker are necessary. It would be courteous to reference Tasker and it's website (http://tasker.dinglisch.net) somewhere in your new app if possible.
Please note that use of images from some Ipacks in commercial software is prohibited by the licence terms of the image creators. You will need to contact the image designer to request their assent in such cases. (the origin of an Ipack's images is displayed in the Ipack image selection screen).
WikiD Instuctables is a not-for-profit venture by CommWi Projects. CommWi Projects or any person affiliated with, are not in any official way, affiliated, endorsed, sponsored or licensed by any of the software, hardware, companies or persons documented on this site. Please address any Copyright or IP concerns to myself so they may be dealt with appropriately. Content hosted on this site, unless otherwise stated, is provided under the license Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).