Ok

FileMode.Open and FileAccess.Read did the trick. Going further with this
experiment!


On Sun, Apr 28, 2013 at 6:32 PM, Francesco Colombo <
[email protected]> wrote:

> It seems that trying to read the apk itself from the app is not possible?
> It gives to me "Unathorized exception".
>
> string apkPath = this.Application.Info.SourceDir;
> using(Stream stream = System.IO.File.Open(apkPath))
> {
> }
>
>
> On Sun, Apr 28, 2013 at 6:11 PM, Jonathan Pryor <[email protected]> wrote:
>
>> On Apr 28, 2013, at 11:43 AM, Francesco Colombo <
>> [email protected]> wrote:
>> > What I meant was if there were any other way to read assets from the
>> Assets folder bypassing the  AssetsManager.
>>
>> That should be possible. Assets are stored in the `.apk`, so you just
>> need to bundle a .zip parser in your app (e.g. Ionic.Zip), grab the path to
>> your `.apk`, and have at it:
>>
>>         string apiFile = context.ApplicationInfo.SourceDir;
>>
>>  - Jon
>>
>> _______________________________________________
>> Monodroid mailing list
>> [email protected]
>>
>> UNSUBSCRIBE INFORMATION:
>> http://lists.ximian.com/mailman/listinfo/monodroid
>>
>
>
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to