Tasker App Factory
http://tasker.dinglisch.net/userguide/en/appcreation.html
App Creation
- Introduction
- Hello World Example
- App Configuration
- Signing
- Target Device Requirements
- Miscellaneous
- FAQ (External Link)
Introduction
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):
- Android 2.3+
- Tasker App Factory (free, see below)
- a device with an ARM or x86 processor (the vast majority of devices have one of those)
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.
Hello World Example
Let's make a simple app that just pops up Hello World! when it's launched. This example assumes that you are in Beginner Mode, please make sure that Menu / Prefs / UI / Beginner Mode is checked before you start.
1. Create A Task
- make a new task
click on the Tasks tab then click + to add a new task. Give it a name Hello World. - give the task an icon
long-click on the colourful icon in the bottom right and pick any icon - add the Popup action
click + in the bottom left to add an action, select category Alert and then action Popup. Fill in Hello World! in the Text parameter, then click the accept button bottom left to accept the action, then again to accept the task. - ask Tasker to create an app
long-click on the task you just made, select Export then As App. A popup appears mentioning a Missing App.
2. Install Tasker App Factory
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.
3. App Generation
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!
App Configuration
When in Beginner Mode, and if you only have one task to install, Tasker will make guesses about how to configure the resulting app.
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.
App Signing
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.
Tasker makes an automatic backup of your 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.
Target Device Requirements
The device the child app is used on must meet the following requirements:
- the minimum SDK version specified in the Kid Config screen
- have hardware corresponding to features specified in the Kid Config screen
Miscellaneous
Accessibility Service
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)
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.
Launch Task
When the specified launch task runs in the child app, the following local variables will be available to it:
- %launch_data: the data (URI) in the intent that caused the child app to launch (often empty)
Monitor Service
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.
Widgets / Shortcuts
- it's not possible in Android to auto-create widgets with any app
- it's not possible *currently* to offer the user child-app widgets, that may be available in the future to some extent
Memory Problems
If you are having low memory problems during app generation, you can ask the App Factory to use external storage for the generation process. See Menu / Prefs / More / Factory.
Preferences
The new app currently has the same default preferences as Tasker with a couple of exceptions.
You can use the Set Tasker Pref action in the Tasker category to change some of the preferences when the app is running.
Available Tasker Features
Obviously, the device the new app runs on may not have the same set of available e.g. actions as the device the app is created on.
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).
Images
Referenced images (even scene doodles and photos from the SD card) are bundled in with the app.
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.
Plugins
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.
JavaScript actions
Scripts referenced by a JavaScript action are packaged with the new app and run directly from there.
SL4A Scripts
Scripts referenced in a Run Script action are packaged with the new app and unpacked to /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.
Other External Components
The following external components are also checked for on launch of the new app where necessary:
- Speech engines (Say, Say After)
- APNDroid (Mobile Data APN)
- Zoom (Zoom action category actions)
- apps for 3rd Party actions
- apps for 3rd Party events
Maps
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:
- [if necessary] setup a Google Account
- [if necessary] create a developer account
- [if necessary] create a signing keystore
- get the SHA1 fingerprint of your certificate:
Menu / More / Developer Options / Certificate Checksum - Create an Google API Project
- Obtain the Maps key
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.
Variables
The new app is completely independent of Tasker, so it also does not share any variable values.
Permissions
Tasker attempts to reduce the set of permissions required by the new app to the smallest set required for the functionality it contains. For example, no Vibratepermission will be requested if there is no vibrate action used.
The WAKE_LOCK permission is unfortunately always required for technical reasons.
App Size
Generated apps are minimally around 640K but are unlikely to be significantly larger unless a lot of images are referenced. It's possible that this minimum can be reduced in the future.
Encryption
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.
Licence
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).
Tasker App Factory的更多相关文章
- Content portal for Pocketables Tasker articles
http://www.pocketables.com/2013/03/overview-of-pocketables-tasker-articles.html I write a lot about ...
- AngularJs:Service、Factory、Provider依赖注入使用与区别
本教程使用AngularJS版本:1.5.3 AngularJs GitHub: https://github.com/angular/angular.js/ ...
- angularjs中provider,factory,service的区别和用法
angularjs中provider,factory,service的区别和用法 都能提供service,但是又有差别 service 第一次被注入时实例化,只实例化一次,整个应用的生命周期中是个单例 ...
- 一次性搞明白 service和factory区别
原文链接 http://blog.thoughtram.io/angular/2015/07/07/service-vs-factory-once-and-for-all.html 等下,已经有一篇文 ...
- AngularJS中的Provider们:Service和Factory等的区别
引言 看了很多文章可能还是不太说得出AngularJS中的几个创建供应商(provider)的方法(factory(),service(),provider())到底有啥区别,啥时候该用啥,之前一直傻 ...
- factory service provide自定义服务
1.factory factory , 就是你提供一个方法, 该方法返回一个对象的实例, 对于 AngularJS 的 factory 来说, 就是先定义一个对象, 给这个对象添加属性和方法, 然后返 ...
- [译]AngularJS Service vs Factory - Once and for all
原文: http://blog.thoughtram.io/angular/2015/07/07/service-vs-factory-once-and-for-all.html Service和Fa ...
- [译]AngularJS中几种Providers(Factory, Service, Provider)的区别
原文: http://blog.xebia.com/2013/09/01/differences-between-providers-in-angularjs/ 什么是Provider? Angula ...
- 使用AngularJS 进行Hybrid App 开发已经有一年多时间了,这里做一个总结
一.AngularJS 初始化加载流程 1.浏览器载入HTML,然后把它解析成DOM.2.浏览器载入angular.js脚本.3.AngularJS等到DOMContentLoaded事件触发.4.A ...
随机推荐
- centos7上安装指定版本gitlab
当我们在做gitlab服务器迁移的时候需要两台服务器中的gitlab相同,如果不同则不让回复git备份.这样我们就要安装指定版本的gitlab. 1. 安装依赖软件 yum -y install po ...
- 洛谷P2149 Elaxia的路线
传送门啦 分析: 我最开始想的是跑两遍最短路,然后记录一下最短路走了哪些边(如果有两条最短路就选经过边多的),打上标记.两边之后找两次都标记的边有多少就行了. 但...我并没有实现出来. 最后让我们看 ...
- ZOJ 3537 Cake(凸包+区间DP)
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3537 题目大意:给出一些点表示多边形顶点的位置,如果不是凸多边形 ...
- 20165203 学习基础和C语言基础调查
一.技能学习经验及体会 对于课外技能来说,我对很多领域都略知一二,但涉足不深,例如体育领域.摄影领域.绘画领域.书法领域等等,我所能拿得出手的就是体育领域的乒乓球了.娄老师的作业题目让我的思绪又回到了 ...
- EFK收集Kubernetes应用日志
本节内容: EFK介绍 安装配置EFK 配置efk-rbac.yaml文件 配置 es-controller.yaml 配置 es-service.yaml 配置 fluentd-es-ds.yaml ...
- #JS Ajax的error函数
使用jquery的ajax方法向服务器发送请求的时候,常常需要使用到error函数进行错误信息的处理, 一般error函数返回的参数有三个: function(jqXHR jqXHR, String ...
- day1作业登录接口总结
作业一:编写登陆接口 1.输入用户名和密码 2.认证成功后显示欢迎信息 3.输错三次后锁定 上面作业,用了几种思路来解决问题:但是本质上其实都是一样的:核心都是对文件的操作,文件的增删改查:并且这些操 ...
- Vue.js学习笔记(一) - 起步
本篇将简单介绍一下Vue.js,并在Node.js环境下搭建一个简单的Demo. 一.简介 我个人理解,Vue.js是一套前端视图层的框架,它只关心视图展示和数据绑定,它的一些语法与Angular 1 ...
- HDU 4443 带环树形dp
思路:如果只有一棵树这个问题很好解决,dp一次,然后再dfs一次往下压求答案就好啦,带环的话,考虑到环上的点不是 很多,可以暴力处理出环上的信息,然后最后一次dfs往下压求答案就好啦.细节比较多. # ...
- CSUOJ 1868 潜在好友
Description 小X在搬砖写一个论坛,这个时候老板突然想到一个功能,让小X今天赶快实现.大概就是如果某个人是你好友的好友那么他的头像上面会有特殊的标志.小X想不到较好的办法来解决如何验证两个人 ...