App Creation - Bundling Linked files other than images

59 views
Skip to first unread message

Benjamin Trinh

unread,
Jun 29, 2015, 1:43:37 PM6/29/15
to tas...@googlegroups.com
Is it possible to bundle files (sounds, videos) into an app using Tasker/App Factory?
I'm trying to create a sound effects app using Tasker and I'm finding that using only the Music Play action to refer to a sound effect doesn't go into the app in when I generate it.

For example, I link a file to a Task via Music Play, and after generating, moving the file somewhere else, and starting the action from the app, it generates a toast saying that the file was not found.

Thanks in advance,
Benjamin Trinh

Marta Hintz

unread,
Jun 29, 2015, 3:46:54 PM6/29/15
to tas...@googlegroups.com
Search this forum as someone has found a work around for linked files with child apps, it seems to work.

Brian Houghton

unread,
Jun 29, 2015, 6:03:02 PM6/29/15
to tas...@googlegroups.com
I've found this:  https://play.google.com/store/apps/details?id=com.alogblog.tkf

Don't know how well it works.

I'm not seeing any other solutions but would be happy if you share anything you do find.

Brian Houghton

unread,
Jun 29, 2015, 6:20:32 PM6/29/15
to tas...@googlegroups.com
Just found this, credits to Darryl Zardin:

I found a workaround to pack the sound file into the .apk, which installs it in a folder on the SD card. For this example, refer to the app as “app.apk”, and the sound file as “sound.wav”.

1.       Assign an icon to a Task; but instead of an icon, select sound.wav. It will be packed into the .apk when exported as App, but as a custom .png file in the res/drawable/ folder. In my case it was “cust_animal_bear.png”. You can identify it by file size, as it will be the exact size of the original sound.wav.

2.       Create tasks to do the following, the first time the app runs:

a.       Create a Temporary folder on the SD Card

b.      Copy app.apk from the data/app directory into the Temporary folder, and change the extension to .zip (i.e., app.zip). You cannot browse to the file in the "Copy File" Action, so locate it with a File Browser, then manually enter the file location. E.g. "/data/app/org.domain.appname-1.apk"

c.       Extract app.zip in the Temporary folder

d.      Create a Permanent folder on the SD Card

e.      Copy the file from the Temporary folder to the Permanent folder, renaming it to sound.wav (in my case, the file on my SD Card was “Temporary/res/drawable/cust_animal_bear.png”)

f.        Delete the Temporary folder



On Monday, June 29, 2015 at 12:43:37 PM UTC-5, Benjamin Trinh wrote:

Jay K

unread,
Jun 30, 2015, 7:19:08 AM6/30/15
to tas...@googlegroups.com
Now, you don't need to use the abnormal method.

Use the action 'Read Binary' and save it to a Global Var.
And copy the Var. in the VARS tab.
And use the action 'Var. Set' and paste it 'To'
Then, use 'Write Binary'.

2015년 6월 30일 화요일 오전 7시 20분 32초 UTC+9, Brian Houghton 님의 말:

Benjamin Trinh

unread,
Jul 1, 2015, 10:21:16 AM7/1/15
to tas...@googlegroups.com
I found this method doesn't transfer variable values over when generating apps. Is there a possible way to transfer variables over using the action Read Binary?

Jay K

unread,
Jul 1, 2015, 6:56:56 PM7/1/15
to tas...@googlegroups.com
I found this method doesn't transfer variable values over when generating apps. Is there a possible way to transfer variables over using the action Read Binary?
 
'Read Binary' and save it to a Global Var.
Copy the Var. in the VARS tab then the binary data is in the clipboard.
Make a new action of Var. Set and paste it 'To'
Then, use 'Write Binary'.

The project file doesn't need the task 'Read Binary'. Try it.

Reply all
Reply to author
Forward
0 new messages