I got the same issue, and found there is no file named favorites.xml in /system/etc/ This sample is designed to add the favorite applications into a bar bottom the screen, but I don't what are the favorite applications in android, and don't know how to favorite the application any way.
Any body, any idea? On Jul 2, 1:22 pm, bayeeblue <[email protected]> wrote: > Hi all, > > I am able to compile theHomeSamplein the 1.5 SDK, however, when > tried to run in emulator or real device, it force close when I try to > switch the thisHomeSample. 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 -~----------~----~----~----~------~----~------~--~---

