123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|654|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Monkey -> Monkey X - install apk through code

Wed, 13 Aug 2014, 09:42
brdtt12
I am new to Monkey so bear with any ignorance.
I started a simple app for the OUYA and am trying to download and install a few files without leaving the app.
The files are downloaded with a simple HttpRequest, which works great, but I am having some trouble finding the best way to install the apk files once they have been downloaded.
I have tried a few different methods but have had no luck. I am not sure if I am writing the code incorrectly or just not using the proper methods. Any help would be greatly appreciated. Thanks.
Wed, 13 Aug 2014, 10:48
Jayenkai
Haven't a clue. I've barely touched even simple file access, never mind installing apk's!!
I imagine that the simplest way would be to just save the .apk in a handy place, then ask the user to open it.
.. If you can even achieve that..!?

-=-=-
''Load, Next List!''
Wed, 13 Aug 2014, 11:12
brdtt12
Thanks for the response Jayenkai.
Using the HttpRequest the files automatically download to the "Download" folder without leaving the app. I'm trying to keep the user in the app to keep it simple so they don't have to search for the various files. I'll keep looking around and hopefully find something.
Wed, 13 Aug 2014, 13:00
Dabz
stackoverflow.com/questions/20932102/execute-shell-command-from-android

Stab in the dark... Any good? You'll have to wrap it like, but, shouldn't take too much me thinks!

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Wed, 13 Aug 2014, 13:10
brdtt12
Thanks Dabz, I'll give that a shot. I was thinking about running a shell command to install the apk's but wasn't sure where to begin. That looks promising. Thanks again.