-2

I'm trying to add files(images) to the app folder when my app is installed and every time if there is any update, I'd like to add more files to the app folder. How can i achieve this?

Thanks a lot.

Regards, Dexter

  • 1
    Which files? Which images? Which folder? There is no such thing as "app folder" in Android. Updates to what? Can you edit your question and give some precise information so we can try and help you. – adelphus Aug 16 '15 at 13:45
  • @adelphus The app folder is the top-level folder when you're developing. You're not supposed to put anything in it, but it does exist. – camdroid Aug 16 '15 at 13:49
  • @adelphus The files or images doesn't matter here as it can be anything. As for the app folder, I'm referring to the folder where you can see when you are developing in the IDE. In my case its eclipse.My question is how can i refer to those folder? The only folder i can access so far is just assets folder. – user3744143 Aug 17 '15 at 01:04
  • @camdroid, thanks for the clarification – user3744143 Aug 17 '15 at 01:04

2 Answers2

0

Whatever you put in the apk is what the user gets. If you add images, then submit the update to Google Play, your users will have those images when they update.

Although your images should be in res/drawable, not in the app folder.

camdroid
  • 524
  • 7
  • 24
0

I'm trying to add files(images) to the app folder when my app is installed

That is not possible, as nothing of your code will run when your app is installed. You are welcome to detect when your app is first run and then do something.

every time if there is any update, I'd like to add more files to the app folder

If your minSdkVersion is 12 or higher, you should be able to register for ACTION_MY_PACKAGE_REPLACED in the manifest and then do something upon receipt of the broadcast.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491