Hi
@Erel,
since I tried to support
@vecino since the beginning, let me explain what's happening.
In a previous
thread we confronted ourselves with a strange problem: the same exact code didn't work on a first device while on a second one it worked in debug mode but not in release mode.
To better understand what was goign on, I modified my AppUpdating library in order to add a lot more Logs.
What vecino found is that, altough the code in the class initialization always and correctly follows the
else branch in the code posted (identical to your FileProvider one), it makes a difference what constitutes the content of the unused
if branch.
In fact, if he correctly uses DirInternal the app fails, but if he writes DirDefaultExternal (which he agrees is wrong) the app works ok.
A few facts about his device:
- sdk is 19
- the failing occurs on line "out = File.OpenOutput(SharedFolder,"tmp.apk",False)"
- SharedFolder is: /mnt/sdcard/Android/data/viamos.com/files/shared
On my testing devices everything works right since the beginning and so, I guess, is for those other memebers using the lib. So what could cause the described failings on both the devices hold by vecino?
udg
ps: please find attached the code used so far for testing