Maddy wrote: > I don't understand why getResourceAsStream() failed to load the file > which is being present at the same directory level!
I don't believe getResourceAsStream() necessarily works on Android. > Then I tried removing challenge.bin in this location and moved to res/ > raw folder of my Android project, even then no luck! If you didn't change the code in the snippet you quoted, you will not have any luck. > Please let me know if I have to change something to above code > correctly pick the file. Try replacing: v10.getResourceAsStream(BIN_FILE) with: resources.openRawResource(R.raw.challenge) where: -- resources is a Resources object, typically obtained via calling getResources() on an Activity, Service, or other Context -- you have put challenge.bin in res/raw/ -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 Available! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Discuss" 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-discuss?hl=en -~----------~----~----~----~------~----~------~--~---
