how to read/write/create files/folder???

by Wesley Sagittarius » Wed, 14 May 2008 08:54:01 GMT


Sponsored Links
 1) how to read/write/create files/folder using android???
like read folder in the phone...

2) how to call browser???

any one have any idea???

Wesley.
--~--~---------~--~----~------------~-------~--~----~



how to read/write/create files/folder???

by Mark Murphy » Wed, 14 May 2008 10:40:23 GMT


 


 http://code.google.com/android/devel/data/files.html covers  
application-specific files.

Also, any standard Java I/O works (e.g., File f=new File("/tmp/foo");), 
so long as you have sufficient permissions.


 http://code.google.com/android/reference/android/webkit/WebView.html 

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
The Busy Coder's Guide to Android Development -- coming in June 2008!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Crash Reports - ACRA new stable version

Hi, fellow Android applications developers,

Here is an update on the ACRA project. (See http://acra.googlecode.com)

For those of you who would not know ACRA, this is an open source
library under Apache license allowing your application to send crash
reports to a Google Spreadsheet. Works on all android versions (tested
from 1.5 to 2.3), without any requirement of publishing your app on
any market.

After a few months of tests, we published a new stable version of
ACRA. Labeled 3.1.0, here are the major changes:

- ACRA's configuration is now done through an annotation attached to
your application class. You don't need to inherit from any specific
Application subclass anymore. This means that you can now use ACRA
with any other rich featured framework like GreenDroid, Droid Fu or
Roboguice which have their own specific Application subclass
inheritance requirement.

- We also added some useful data to the reports:
  * The details (and in a human readable flavour) of the device
android.content.res.Configuration at its initial state when your
application starts . This includes the user locale (language/country),
his Mobile Country Code and Mobile Network Code, the type of available
input methods (keyboard, navigation, touch...), screen orientation
(landscape/portrait)...
  * The same Configuration data but at the moment of the crash. This
can allow to track issues due to Configuration changes like opening/
hiding physical keyboard, changing orientation... These issues are
often hard to understand and I'm sure you'll find this useful.
  * The details of the screen size, resolution, density, refresh
rate...
  * The user local date/time of the crash

- A Wiki page has been created to help you configure ProGuard to work
with ACRA : http://code.google.com/p/acra/wiki/ACRAProGuardHowTo
(thanks to pingrys!). Please feel free to add your comments to improve
this doc and help debugging applications using ProGuard.

What's coming next ?

The next version should be available "in the few following weeks" and
will allow you to include in crash reports:
- contents of the main logcat
- contents of the events logcat
- contents of the radio logcat
- contents of the dropboxmanager (maybe this could lead to future
works on using StrictMode API to report ANR issues ?)
- more data about the dalvik memory usage

We are still working on a potential way of providing a new Reporting
Interaction Mode which would be a direct Dialog (without status bar
notification). Though, this is a really hard work and can't plan any
ETA for the moment. (thanks go  to brainpilot!).

I hope this will help you to go further in improving your applications
quality and reduce your "platform fragmentation" headaches ;-)

All comments and new ideas about ACRA are welcome !

I wish you all the best for the few last days of 2010 and beyond,

Kevin

Kevin

-- 

2. Difference in Graphic layer composition in Froyo vs Eclair

Hi All,

I need some help on the issue mentioned below.

Issue:- Difference in graphics view composition/View in froyo as
compared to eclair.[omapzoom3 board+android kernel l25-inc3.4]

[Procedure]:-
   1.Launch Camera app.
   2.On preview screen, long press "HOME" key.

FROYO Observation:-
   Currently Used/active application icons are displayed on preview
screen without any black background.


Eclair Observation:-
    Currently Used/active application icons are displayed on preview
on
black background.


Analysis:-

in sys entries i could see that trans_key_enabled is true and value is
set to 0 which is black.When
i turn it to value other than 0 for eg  16711680 -red then the whole
graphics layer shows a black plane along with the icons populated in
the same place as before.(I can see the video layer objects outside
this black plane as before).So it appears that the graphics layer
composition and the color key value is not getting correctly set.

Queries:-

1. Is  this the expected behavior in Froyo where we want the preview
to
be seen and hence the black plane made transperent or not composed
accordingly?

2. What software settings could be modified to make the black plane
visible?(making it same as Eclair observation)

3. Which Android Software component(applications like surface
flinger)
outside the kernel handles this and how?

Thanks,
Ninad

-- 

3. Adding library to reference-ril

4. enable EAP sim in nexus one

5. x86 Creating filesystem error

6. Android CTS

7. issues in building GingerBread