Note that there are some explanatory texts on larger screens.

plurals
  1. PORingtoneManager.ACTION_RINGTONE_PICKER crashes on some devices
    primarykey
    data
    text
    <p>the following code keeps crashing on some devices (instantly closes the ringtone picker dialog), on most of the devices it's working as expected. I didn't manage to find a common common denominator for the devices on which it crashes.</p> <p>I'd be really really happy if someone could help me with this problem. BTW: Logcat shows absolutely nothing. No errors.</p> <p>This is the code</p> <pre><code>protected void chooseRingtone() { final Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, false); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, RingtoneManager.TYPE_ALL); intent.putExtra(RingtoneManager.EXTRA_RINGTONE_TITLE, getString(R.string.choose_ringtone)); if (ringtoneURI != null) { intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, ringtoneURI); } else { intent.putExtra(RingtoneManager.EXTRA_RINGTONE_EXISTING_URI, (Uri) null); } startActivityForResult(intent, RINGTONE_RESULT); } @Override protected void onActivityResult(final int requestCode, final int resultCode, final Intent data) { if (resultCode == RESULT_OK &amp;&amp; requestCode == RINGTONE_RESULT) { ringtoneURI = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI); if (ringtoneURI != null) { try { ringtoneString = RingtoneManager.getRingtone(this, ringtoneURI).getTitle(this); } catch (final Exception e) { ringtoneString = "unknown"; } ringtone.setText(ringtoneString); } } } </code></pre> <p>The Manifest looks like this:</p> <pre><code>&lt;uses-sdk android:maxSdkVersion="17" android:minSdkVersion="8" android:targetSdkVersion="8" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload