Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting a song as ringtone crashes the app #5

Open
kodeblacc opened this issue Mar 10, 2018 · 12 comments
Open

Setting a song as ringtone crashes the app #5

kodeblacc opened this issue Mar 10, 2018 · 12 comments

Comments

@kodeblacc
Copy link

Expected behavior

I expected to be able to set a track as ringtone

Actual behavior

When I select a track to set as ringtone, the app crashes

How to reproduce

  • download the app from fdroid
  • launch the app and allow all permissions from your app settings
  • click on the 3 dots beside any track to access it's options
  • select option to set track as ringtone and the app crashes
  • Browser: Infinix note 4
  • Operating system: android 7.0
  • App version: v1.0

Recording Of The Bug

https://youtu.be/tu0mZtv-lqM



Posted on Utopian.io - Rewarding Open Source Contributors

@dwi336
Copy link
Owner

dwi336 commented Mar 11, 2018

Hi,

Thank you for the report.

WRITE_SETTINGS permission must be explicitly granted for the app since M. I will fix it in the next release.

Thank you.

dwi336

@kodeblacc
Copy link
Author

kodeblacc commented Mar 11, 2018 via email

@dwi336
Copy link
Owner

dwi336 commented Mar 11, 2018

Changed

// Check since M whether has the write settings permission or not.

// Check since M whether has the write settings permission or not.
boolean settingsCanWrite = true;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
settingsCanWrite = Settings.System.canWrite(context);
if (!settingsCanWrite) {
// If do not have write settings permission then open the Can modify system settings panel.
Intent intent = new Intent(Settings.ACTION_MANAGE_WRITE_SETTINGS);
context.startActivity(intent);
}
}
if ( settingsCanWrite ) {
Settings.System.putString(resolver, Settings.System.RINGTONE, uri.toString());
final String message = context.getString(R.string.set_as_ringtone,
cursor.getString(2));
Toast.makeText((Activity)context, message, Toast.LENGTH_SHORT).show();
}

In my tests it works.

dwi336

@dwi336 dwi336 closed this as completed Mar 11, 2018
@kodeblacc
Copy link
Author

kodeblacc commented Mar 11, 2018 via email

@dwi336 dwi336 reopened this Mar 14, 2018
@kodeblacc
Copy link
Author

kodeblacc commented Mar 14, 2018 via email

@dwi336
Copy link
Owner

dwi336 commented Mar 14, 2018

On physical devices I only use custom ROMs. So I tested the function with Android emulator. Nougat for example:
screenshot_1521067095
screenshot_1521067175

Could you please post screenshots or logcat?

Thank you

dwi336

@kodeblacc
Copy link
Author

kodeblacc commented Mar 14, 2018 via email

@dwi336
Copy link
Owner

dwi336 commented Mar 14, 2018

  1. What happened, if you click on the pop up menu entry? Did the app call up and switch to the system settings menu (activity)?
  2. In the system settings menu, did you allow the app to modify the system settings?

@kodeblacc
Copy link
Author

kodeblacc commented Mar 14, 2018 via email

@kodeblacc
Copy link
Author

kodeblacc commented Mar 15, 2018 via email

@dwi336
Copy link
Owner

dwi336 commented Mar 16, 2018

Hello,

Thank for your praise, but I just building the upstream app from

https://github.com/LineageOS/android_packages_apps_Eleven

Nevertheless I am happy that someone else like the app. I will try to find more devices to adjust the bug on different stock roms. I am very sorry, but unfortunately this will take some time.

dwi336

@kodeblacc
Copy link
Author

kodeblacc commented Mar 16, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants