droid x2 ext storage error in debug

tomb

Member
Licensed User
Longtime User
When I attempt to run my droid x2 in debug, the external storage appears to be inaccessible. The statement that displays the error:

Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
Log("************ Vampire Of Needham ************")
If File.ExternalWritable = False Then
Msgbox("Cannot write on storage card.", "")
Return
End If

The application installs and runs correctly when I'm not trying to debug.

When I use the T-Mobile G1 developers Android, I can run the same program in debug as intended.

One other quirk. I can download and install an .apk from Android market but I can't download and install the same .apk file from a web site using allow "Unknown sources".
 

tomb

Member
Licensed User
Longtime User
It will not run in debug until I comment out all references to the SD card. It appears that connecting the X2 to the usb locks out the SD card. It runs in debug until it encounters a reference to the SD card.

If the unit is not in Debug, it runs the apk with the SD referrences.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
This is not unusual. The SDcard can only be accessed by either the PC or the device, not both at the same time, for Android versions before 3.0. If you don't get a message box asking whether to mount the SDcard or not when you plug in the USB cable to your computer then I expect that it is being mounted automatically, Look in the notification area for some indication of this.

If your device will not let you unmount the SDcard from the PC when it is connected then you will have to use B4ABridge to debug an app that uses external storage.
 
Upvote 0

tomb

Member
Licensed User
Longtime User
I solved the sd card access and debug problem by changed the file location to the application's internal files. They are quite small and were on the SD card so I could easily see what was being written to the setting files and change them as needed. Now that the settings files are moved, the debug works correctly.
Tom B
 
Upvote 0
Top