Importing a ".flo" file into AutoMate from a local directory

1,625 views
Skip to first unread message

harshsyd

unread,
Jun 24, 2018, 11:39:05 AM6/24/18
to automa...@googlegroups.com
Hi there!

So, I have a file in my phone's storage in the folder "AutoMate/FLOW_BACKUPS/". The path is basically "AutoMate/FLOW_BACKUPS/Remote_Tools.flo" for my file as shown by Automate itself.

So what I am simply trying to do is get Automate to import this local file into the app. I have taken a look at the demo flow provided called "Self Update" example, however I am a complete rookie to Automate and that flow is updating via an online resource, mine isn't so here's the change.

So what can I essentially do to import this local file into my automate app? I've tried several methods, but I kept getting errors upon importing (as I am doing it wrong of course). So can someone provide me with an approach on how can I import this flow automatically? I tried the App Package and then FlowImportActivity deal, but I couldn't proceed further as I got errors and had no directions to go to. I think I tried to straight import the .flo file and hence I got errors, using that Self Update example, I think the .flo file needs to be decoded using json and such, and I have zero idea on how to do that sadly.

I am doing this for my friend's device as I will be constantly "updating" flows on his phone and all he needs to do is tap OK whenever he sees the request, everything else is essentially 100% automated.

Thanks!

Henrik "The Developer" Lindqvist

unread,
Jun 24, 2018, 2:48:53 PM6/24/18
to Automate
The .flo file don't need decoding, just send it (the file:// URI) to the FlowImportActivity as shown in the Self update example.

harshsyd

unread,
Jun 24, 2018, 6:24:02 PM6/24/18
to Automate
Right, I'll give this a go soon when I find the time.
One more question mate, in the self update example, it also has a bunch of code for the "extras" field.

Would I need any of that here or nope? Is it just specific for description and title and stuff?

Henrik "The Developer" Lindqvist

unread,
Jun 24, 2018, 8:08:54 PM6/24/18
to Automate
The Extras are only for title and description.

harshsyd

unread,
Jun 24, 2018, 11:37:16 PM6/24/18
to Automate
Alright, I cannot seem to make it work.

I don't understand how I can get the URI of a local file into this flow to import it. The .Flo file will not have a URI until it is actually imported in Automate right? Like, it always has a variable number that changes according to the device so how will I even do it?

An example with local files should be sufficient.

Henrik "The Developer" Lindqvist

unread,
Jun 25, 2018, 3:09:01 PM6/25/18
to Automate
Just prepend "file://" e.g.:
"file:///sdcard/foobar.apk"


harshsyd

unread,
Jun 25, 2018, 11:51:34 PM6/25/18
to Automate
Hey!
Yeah, it works just fine now. Thanks mate.

Also one thing, is there a way I can get delete a certain flow? So after I push a new one over to my mate's device, can I set the old one to be deleted or does he have to do it manually himself?

Henrik "The Developer" Lindqvist

unread,
Jun 26, 2018, 9:51:11 PM6/26/18
to Automate
Not possible, to prevent a malicious flow from deleting other flows, or itself.

harshsyd

unread,
Jun 28, 2018, 7:32:42 AM6/28/18
to Automate
Hi!

Okay, no worries. Thanks for your assistance Henrik. You may close this if you wish.

Thank you.

ja...@gajdusek.org

unread,
Sep 5, 2018, 3:35:27 AM9/5/18
to Automate
hele Click on Import > SD card (if it is in internal memory ) and the persimision to this place will popup. After granted access to storage the .flo is possible import

Dne neděle 24. června 2018 17:39:05 UTC+2 harshsyd napsal(a):
Reply all
Reply to author
Forward
0 new messages