Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4android > Additional libraries, classes and official updates > Libraries developers questions
Documentation Wiki Register Members List Windows Mobile Search Today's Posts Mark Forums Read

DirAssets

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-09-2012, 07:29 AM
derez's Avatar
Basic4android Veteran
 
Join Date: May 2007
Posts: 1,206
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default DirAssets

How can I access File.DirAssets from a jave library ?

I use the following code with Assets = True :
Code:
if(Assets) 
    st = 
File.Combine(File.getDirAssets(), "WMMC.COF") ;
else
    st = 
File.Combine(File.getDirRootExternal() + "/Magnetics""WMMC.COF") ;
and get the following error:
Quote:
Java.io.FileNotFoundException /AssetsDir/WMMC.COF (no such file or directory)
when using False - it works (for File.DirRootExternal).
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 05-09-2012 at 07:35 AM.
Reply With Quote
  #2 (permalink)  
Old 05-09-2012, 08:09 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 25,807
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The assets folder is not a real folder. You cannot treat it as a standard folder. The various File methods know how to treat this folder.
The simplest solution is to call File.getInputStream. This method will open correctly all files.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
FileDialog DirAssets problem mebcs Basic4android Updates and Questions 1 03-16-2012 01:37 AM
File.DirAssets dmtulsa Basic4android Updates and Questions 8 12-01-2011 06:02 AM
What's under DirAssets? boten Basic4android Updates and Questions 3 11-09-2011 05:55 AM
SQL DB Copy From DirAssets problem petri2000 Basic4android Updates and Questions 3 07-14-2011 11:23 AM
Wish: Directories in DirAssets kickaha Bugs & wishlist 0 02-23-2011 11:27 PM


All times are GMT. The time now is 12:30 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0