Help with saving data.

by [EMAIL PROTECTED] » Fri, 14 Nov 2008 11:34:20 GMT


Sponsored Links
 Hi all,

First of all I'm new to both java and android, so please excuse me if
I'm asking foolish questions.

I have created an app, and am looking to save some data to either a
raw file or an xml file. I see plenty of information about reading
data from these kinds of files (openRawResource(id) etc.) but very
little about writing to them.

Could anyone point me in the direction of a tutorial or some sample
code/material that includes saving to either an xml or raw file?

Any help is greatly appreciated..

Thanks,

Redders.

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



Other Threads

1. Table does not exist

Hi,

I need some help pinpointing this error, I cannot reproduce it on my
G1 or on any emulator image (yes I've wiped the data on the emulators
before starting), but I've gotten 3-5 reports from the developer page
with this error. (reports come from nexus one and droid, so I assume
it has to do with either froyo or eclair)

Before anyone says, "it's simple, there is no table called
locationfavorites", let me ask why this only happens on some devices
and not others? My DBAdapter also has in it's onCreate() method the
table creation statement that it needs.

android.database.sqlite.SQLiteException: no such table:
locationfavorites: , while compiling: SELECT _id, name, latitude,
longitude FROM locationfavorites
  at
android.database.sqlite.SQLiteProgram.native_compile(SQLiteProgram.java:-2)
  at android.database.sqlite.SQLiteProgram.compile(SQLiteProgram.java:
110)
  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:
59)
  at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:49)
  at
android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:
49)
  at
android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:
1221)
  at
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:
1108)
  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:
1066)
  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:
1143)
  at
com.jukaku.masjidnow.FavoritesDBAdapter.getAllLocationFavorites(FavoritesDBAdapter.java:
100)
  at com.jukaku.masjidnow.Home.startEditFavorites(Home.java:361)

-- 

2. networking issues to android emulator

Hi All,

My application needs to connect to the android emulator from the
machine the emulator is hosted upon, just like a machine on a network
would try to connect to another machine or send packets to it.

But, I am not able to do that. All the help that I found was to
connect to the console and deal with the network settings. But that
does not serve my purpose. Could anyone please help me in this
direction as the progress of my project is stalled at this.

Thanks in advance.

Swati Sharma

-- 

3. OMAP Zoom 2

4. Character lookup for keyboard longpress

5. Android Init Language: on device-added-<path> on device-removed-<path> fail.

6. Android 2.2 emulator is so slow

7. Android Instrumentation - "Unable to resolve Activity" error