Search code examples
androidandroid-emulatorandroid-virtual-deviceapk-expansion-files

Android - How to test application with Expansion Files with Emulator?


I am developing an application for android devices which uses Expansion Files, and want to test it on AVD. My application contains code for manual download the Expansion Files, but it fails while running on AVD (calling onDownloadStateChanged method with value STATE_FAILED_FETCHING_URL, and shows the message: "Download stopped becouse he resources could not be found"). I tested the application on real devices and it worked. How can I make the download work, or add the Expansoin Files manually?

If it change sometiong, my computer runs Windows 7 and I use Eclipse IDE Juno Release.


Solution

  • You can load the expansion files onto your AVD through the command line or using the DDMS perspective in Eclipse. In DDMS, select the File Explorer tab, then traverse to the directory the expansion files should be stored in. Then select the cell phone with an incoming arrow icon. You can then select the file to load onto the AVD. Drawback to this method is it only allows uploading one file at a time.

    You can use [adb commands to upload multiple files at once][1].