Skip to content

Comments

Update sdk#66

Open
RobbieNesmith wants to merge 14 commits intobillthefarmer:masterfrom
RobbieNesmith:update-sdk
Open

Update sdk#66
RobbieNesmith wants to merge 14 commits intobillthefarmer:masterfrom
RobbieNesmith:update-sdk

Conversation

@RobbieNesmith
Copy link

I used to use this app on my old phone but got a warning about the SDK being out of date on my new phone.

In order to use the Android 15 SDK as a target, I also had to update the gradle plugin according to this SO post. While doing that I did the recommended gradle updates.

Also I'm trying to get some older Android apps working on my phone as part of Hacktoberfest, so if you wouldn't mind could you add the "hacktoberfest-accepted" label to this PR?

@billthefarmer
Copy link
Owner

The reason I have not increased the SDK version from 28 is that most of my apps use Environment.getExternalStorageDirectory() to access storage to read or write data. This app uses it to read custom temperaments from a predefined folder, which was a requested enhancement. There is a storage API which allows a hint to point the user towards a particular folder, which I have been unable to get to work. The loadCustomTemperaments() code in SettingsFragment.java does try the app's public storage first, but this is fiddly for the user and not documented.

You need to test whether custom temperaments still work. I would expect the build script to complain about Environment.getExternalStorageDirectory() being deprecated or disabled.

@RobbieNesmith
Copy link
Author

Ahh I see. I'll do some testing

@RobbieNesmith
Copy link
Author

I tried out a few things to make this compatible and this is what I came up with.
Instead of loading the settings from a file, this provides a "text editor" to input custom temperament data. From here, it is then saved to the app's external files directory and loaded using the existing process.

There are a few things yet to do here, so let me know if you like this solution and I'll wrap them up.

  • Strings need to be extracted to the strings.xml files
  • Help text needs to be changed so that it says to use the editor instead of providing a Tuner/Custom.txt file

@billthefarmer
Copy link
Owner

I have increased the SDK to 31 and implemented a load custom temperaments function that uses the Storage API and doesn't seem to need the READ_STORAGE permission at least on some devices.

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

Successfully merging this pull request may close these issues.

2 participants