0

I have devices MOTOROLA DROID ULTRA which does not support External Storage.

My manifest file contains permissions-

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

Due to these permissions, I am unable to see my application on device MOTOROLA DROID ULTRA.

I know how to set permissions to be not required for other features that I am using like-

For camera,

<uses-permission android:name="android.permission.CAMERA" />

I used,

<uses-feature 
      android:name="android.hardware.camera" 
      android:required="false" />

  <uses-feature 
      android:name="android.hardware.camera.autofocus" 
      android:required="false" />

How about external storage ?

sjain
  • 23,126
  • 28
  • 107
  • 185
  • Your premise seems doubtful. Do you have a hard citation for the claim that this device does not support external storage? Please note that "external storage" on Android does not necessary imply a removable SD card. – Chris Stratton Nov 25 '13 at 16:39
  • See MOTOROLA DROID ULTRA reviews - http://www.engadget.com/2013/08/23/motorola-droid-ultra-review/. Its mentioned in table specs- `External storage - None` – sjain Nov 26 '13 at 07:55
  • The wording is confusing, but that means there is no removable storage. It **does not** mean that there is no "External Storage" for the Android API of that name. In fact there are gigabytes, allocated on demand from the same physical blocks as the Internal Storage. Having a conceptual "External Storage" is a Google Play requirement, and this phone is from an outfit owned by Google. – Chris Stratton Nov 26 '13 at 12:02
  • ok, the only reason that I want to set the external storage to false is because somehow my application which is on Google Play Store is not showing on this device and I found this as the only issue. However, looking at [Permissions that Imply Feature Requirements](http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions) , I don't think that is the reason. Do you agree ? – sjain Nov 26 '13 at 12:11
  • Indeed, the issue must be with something else. – Chris Stratton Nov 26 '13 at 19:34

2 Answers2

0

Your Moto Droid does technically use and allow external storage, just not in the conventional sense; it is emulated on the internal SD card. This means instead of having an actual external SD card, it has an emulated location, i.e. instead of /storage/sdcard0, actual file uri may look like /storage/emulated/0/

Luckily we don't have to worry about this and is a great example of why it is important to use the Environment class when defining file location uri: File storageDirectory = new File(Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+*myFileName*); instead of File storageDirectory = new File(/sdcard/*myFileName*)

Let us know if you answered you found the solution to your question.

sevenboarder
  • 325
  • 1
  • 4
  • 7
0

what i hav understand is your device do not support the external sdcard because i met up with the same problem so my solution might help you

so first you have to install a app name ES File Explorer-this app will show you all the folders files and stored data in your device.

then keep one thing in mind

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

the code gives you a permission to read a specific folder whether it is in your device's internal memory or your devices sdcard.

File sdcard = Environment.getExternalStorageDirectory();
 Log.i("memory",sdcard) ;

so if you device does not support sdcard than this code in MainActivity.java will return a path to its internal memory's folder and path will be printed in the logcat .

then by Es explorer you can visit the folder

jayant singh
  • 929
  • 12
  • 17