Created
October 10, 2012 05:30
-
-
Save Gopinathp/3863340 to your computer and use it in GitHub Desktop.
On any typical android activity, in which you want to have copy app private files to sdcard, wire the Common.java code to handle the file copying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final int MENU_COPY_FILES = 99; | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
getMenuInflater().inflate(R.menu.activity_kid_feed, menu); | |
if (BuildConfig.DEBUG) { | |
menu.add(Menu.NONE, MENU_COPY_FILES, Menu.NONE, "Copy App Files to sdcard"); | |
} | |
return true; | |
} | |
@Override | |
public boolean onOptionsItemSelected(MenuItem item) { | |
switch (item.getItemId()) { | |
case MENU_COPY_FILES: | |
Common.handleCopyFilesToSdCard(App.getContext()); | |
break; | |
default: | |
break; | |
} | |
return super.onOptionsItemSelected(item); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment