Hi all,
I am able to compile the Home Sample in the 1.5 SDK, however, when
tried to run in emulator or real device, it force close when I try to
switch the this Home Sample. I was told to move the if(mFavorites)
block up in bindFavorites() function, but it still not working.
Anyone know how to get it work ?
Thanks.
Best Wishes,
Bayeeblue
------------------------------
private void bindFavorites(boolean isLaunching) {
if (!isLaunching || mFavorites == null) {
FileReader favReader;
// Environment.getRootDirectory() is a fancy way of
saying
ANDROID_ROOT or "/system".
final File favFile = new File
(Environment.getRootDirectory
(), DEFAULT_FAVORITES_PATH);
/* move this up before try catch */
if (mFavorites == null) {
mFavorites = new LinkedList<ApplicationInfo>();
} else {
mFavorites.clear();
}
try {
favReader = new FileReader(favFile);
} catch (FileNotFoundException e) {
Log.e(LOG_TAG, "Couldn't find or open favorites file
"
+ favFile);
return;
}
----------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---