I am nearing the end of a project that I am working on using Android, but ran into a small hit on the road when we got a new device to test our application.
I am programming using Android 1.6, and my two devices are:
HTC Incredible - Verizon (Android 2.2)
Samsung Galaxy S - T-Mobile (Android 2.1 update)
One part of the application allows the user to select a recorded audio file using:
i = new Intent();
i.setAction(Intent.ACTION_GET_CONTENT);
i.setType("audio/*");
startActivityForResult(Intent.createChooser(i, "Select audio file"), Enums.REQUEST_CODE_SELECT_ATTACHMENT);
And onActivityResult is called after the selection.
if (resultCode == RESULT_OK && Enums.REQUEST_CODE_SELECT_ATTACHMENT == requestCode))
{
// do something here
}
else
{
//ResultCode comes back as RESULT_CANCELED
}
This works fine on the device on which I programmed my original application (HTC Incredible - Verizon).
Samsung Galaxy S (T-Mobile) (Music Player | Voice Recorder), .
Music Player, ( HTC, , ).
Voice Recorder, onActivityResult RESULT_CANCELED - " ".
- ? !
!