pluton Active Member Licensed User Longtime User Jun 15, 2012 #1 I have a problem with one app. I have a litlle .apk inside my .apk (application). Don't ask me why because one user want that way Ok This code works fine with info.apk (100 Kb) Code: Copy If File.Exists(File.DirAssets,"info.apk") Then File.Copy(File.DirAssets, "info.apk", File.DirDefaultExternal,"info.apk") End If But when I put a diffrent .apk (studio.apk - 3 Mb) the app stops working and debuger says: Last Exception: java.io.IOException :BangHead: :BangHead: Is there any way to copy larger files to sdcard or some storage to install that stupid .apk or I must say to user to download from internet and then install :BangHead: :BangHead:
I have a problem with one app. I have a litlle .apk inside my .apk (application). Don't ask me why because one user want that way Ok This code works fine with info.apk (100 Kb) Code: Copy If File.Exists(File.DirAssets,"info.apk") Then File.Copy(File.DirAssets, "info.apk", File.DirDefaultExternal,"info.apk") End If But when I put a diffrent .apk (studio.apk - 3 Mb) the app stops working and debuger says: Last Exception: java.io.IOException :BangHead: :BangHead: Is there any way to copy larger files to sdcard or some storage to install that stupid .apk or I must say to user to download from internet and then install :BangHead: :BangHead:
NJDude Expert Licensed User Longtime User Jun 15, 2012 #2 Try changing the extension from .apk to . jpg (I know it doesn't make sense but it's a workaround), so, your code should look like this: Code: Copy If File.Exists(File.DirAssets,"info.jpg") Then File.Copy(File.DirAssets, "info.jpg", File.DirDefaultExternal,"info.apk") End If Give that a shot. Upvote 0
Try changing the extension from .apk to . jpg (I know it doesn't make sense but it's a workaround), so, your code should look like this: Code: Copy If File.Exists(File.DirAssets,"info.jpg") Then File.Copy(File.DirAssets, "info.jpg", File.DirDefaultExternal,"info.apk") End If Give that a shot.
pluton Active Member Licensed User Longtime User Jun 15, 2012 #3 Ok Sure I will try. That problem keeping me busy half a day. I tell you if it worked Sent from my LG-P500 EDIT: Yes. It works if I rename extension. Thanks for tip Last edited: Jun 15, 2012 Upvote 0
Ok Sure I will try. That problem keeping me busy half a day. I tell you if it worked Sent from my LG-P500 EDIT: Yes. It works if I rename extension. Thanks for tip