app.OpenFile

102 views
Skip to first unread message

Vinetwigs.

unread,
Jun 29, 2016, 4:26:28 PM6/29/16
to DroidScript
Hello everyone!
I got a question forma you.
When i use app.OpenFile() i must specify the file and the type.
What i must write in type?
Can you write me all the file types i can open ?

BareK

unread,
Jun 29, 2016, 4:43:26 PM6/29/16
to DroidScript
Hello :)

This is quite difficult to respond.
This function waits a MIME Type, but those can be defined by the device installed apps (aka you can create your own).

Generic types could be:

text/*
image/*
video/*

Here's an example for videos:

app.OpenFile( "/sdcard/myVideo.mp4", "video/*", "Select a video player" );

For more infos:
Message has been deleted

Vinetwigs.

unread,
Jul 1, 2016, 2:20:34 AM7/1/16
to DroidScript
How can i create a custom one?

Arthur .Emanuel

unread,
Jul 1, 2016, 3:04:32 PM7/1/16
to DroidScript
I think you can't create a custom MIME type, i just THINK

Steve Garman

unread,
Jul 1, 2016, 3:18:38 PM7/1/16
to DroidScript
You can create a mime type just by using it
"text/vinetwigs"
"audio/vinetwigs"
"vine/twigs"

However, there is very little point in doing so in app.OpenFile unless you are going to create another app to open the file.

Usually, it is better to pick one of the commonest existing ones from somewhere like https://www.sitepoint.com/web-foundations/mime-types-complete-list/

Often, a wildcarded type will be better like
"text/*"

Steve Garman

unread,
Jul 1, 2016, 3:25:35 PM7/1/16
to DroidScript
Actually, to be more polite, I should have suggested:
"text/x-vinetwigs"
"audio/x-vinetwigs"
"vine/x-twigs"

Vinetwigs.

unread,
Jul 1, 2016, 3:30:28 PM7/1/16
to DroidScript
Thank you so much!
You know EVERYTHING....i'll ne like you zone day.

Vinetwigs.

unread,
Jul 1, 2016, 3:30:29 PM7/1/16
to DroidScript

Steve Garman

unread,
Jul 1, 2016, 3:35:50 PM7/1/16
to DroidScript
Thanks Vinetwigs.

I'm 63 and every day I find something new I wish I knew.

I used to be able to learn quite a few of things I wanted to.

These days I forget more than I learn.

Believe me, the learning years are the most fun.

Vinetwigs.

unread,
Jul 2, 2016, 5:15:58 AM7/2/16
to DroidScript
Can i know how did u started programming?
I love so much programming, but idk how to start.

XGamer CraftTime-Network

unread,
Jul 2, 2016, 5:51:23 AM7/2/16
to DroidScript
I can tell you,how i started with Programming:

When i started, i wanted to create own Programms.

I used Samples, to try new Stuff and changed a few parts and then i knew, how it worked.
And at a certain Point i was using the Programms Documentation to try new Functions.

Currently, i can work out Problems on my own and if i dont know any Parts, i just google my Problems.

Alex F

unread,
Jul 3, 2016, 8:02:00 AM7/3/16
to DroidScript
I also searched for some function in DroidScript Wiki
http://wiki.droidscript.me.uk/doku.php
but I hope the available options for some settings will be added.
For example what you can set for options in app.CreateButton.
Reply all
Reply to author
Forward
0 new messages