[HOW TO] Export project as app with additional files
Have you ever wanted to export app in tasker with inserted music or documents? I think that I have a solution: 1. For first you will need to read binary of selected file. Use something like this: ReadBinary (239) A1: Read Binary [ File:Download/song1.mp3 To Var:%FileBinary ]
2.Now you have data of your file saved in variable %FileBinary. Copy it and in launch task of your app create something like this: LaunchTask (240) A1: If [ %Launches !~ 1 | %Launches < 1 ] A2: Variable Set [ Name:%song1binary To:COPsjs Do Maths:Off Append:Off ] A3: Create Directory [ Dir:YourAppFolder Create All:Off Use Root:Off ] A4: Write Binary [ Variable:%song1binary File:YourAppFolder/song1.mp3 ] A5: Variable Set [ Name:%Launches To:%Launches+1 Do Maths:On Append:Off ] <Normal actions under this Else.> A6: Else
3. That's all! Make this with all your files, but remember to write binary to file with right format. When your app will be launched first, files will be created in selected folder and you can use it in your app later.
Posted Aug 29, 2015, 1:41 PM UTC