You could use PackageManager to get the ApplicationInfo, and from there check the "flags" for FLAG_EXTERNAL_STORAGE.
http://developer.android.com/intl/de/reference/android/content/pm/ApplicationInfo.html#FLAG_EXTERNAL_STORAGE
Here's a quick example I made to demonstrate:
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
PackageManager pm = getPackageManager();
try {
PackageInfo pi = pm.getPackageInfo("com.totsp.helloworld", 0);
ApplicationInfo ai = pi.applicationInfo;
// this only works on API level 8 and higher (check that first)
Toast
.makeText(
this,
"Value of FLAG_EXTERNAL_STORAGE:"
+ ((ai.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) == ApplicationInfo.FLAG_EXTERNAL_STORAGE),
Toast.LENGTH_LONG).show();
} catch (NameNotFoundException e) {
// do something
}
}
Still, depending on your situation (whether or not you have all the "media" up front, or the user gets/creates it as they use the app), you may want to put it on the external storage regardless. A large size internal app is frowned upon by many users (and a lot of internal media would probably make it huge).