Android Shell Code
Posted: Sat Mar 14, 2020 4:12 pm
Hello Programmers:
I have some cool code pieces, which can help many of you! All of these are for android, so have fun. Of course, there are many more, but I think, these are the important ones. If you have some more questions, please write them below!
When you have some improvements, write me a private message, or below.
I will improve and find more of such cool commands, and I will share them with you!
Open file with the standard program: (by thecoolpeople)
Share file: (by thecoolpeople)
I have some cool code pieces, which can help many of you! All of these are for android, so have fun. Of course, there are many more, but I think, these are the important ones. If you have some more questions, please write them below!
When you have some improvements, write me a private message, or below.
I will improve and find more of such cool commands, and I will share them with you!
Open file with the standard program: (by thecoolpeople)
Code: Select all
local openFile = function(path, mimetype)
path = love.filesystem.getSaveDirectory() .. "/" .. path
path = "file://" .. path
os.execute("am start --user 0 -a android.intent.action.VIEW -d " .. path .. " -t " .. mimetype)
end
Code: Select all
local shareFile = function(path, mimetype)
path = love.filesystem.getSaveDirectory() .. "/" .. path
path = "file://" .. path
os.execute("am start --user 0 -a android.intent.action.SEND -t " .. mimetype .. " --eu android.intent.extra.STREAM " .. path)
end