Insights Create an Android Ringtone Picker with Ringtonemanager Class

  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
  • Tags Tags
    Android Class
Click For Summary
The discussion focuses on creating an Android ringtone picker using the RingtoneManager class, emphasizing the need for basic Android programming knowledge and the use of Java for coding. It highlights the importance of setting up Android Studio correctly, noting that transitioning from different IDEs can pose challenges. A suggestion was made for a comprehensive tutorial aimed at beginners, but concerns were raised about the abundance of existing resources. Additionally, the conversation touched on the limitations of standard Android apps regarding battery charge control, clarifying that there is no official method to manage charging current without rooting the device. The article aims to enhance user experience by adding a media player to play selected ringtones.
Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,180
Reaction score
2,721
In this article, I will show you how to create a ringtone picker using the RingtoneManager class in Android. You will be able to get the list of tones, display them as RadioButton , and let the user pick one tone from the list.
I expect you to have a basic knowledge of programming in Android. You should already have set up Android Studio and all the essential components required to build an Android app.
All code in this article will be in Java and not Kotlin.

Table of Contents
ToggleAn introduction to the RingtoneManager class:Launching the default ringtone picker using an implicit...


[url="https://www.physicsforums.com/insights/create-an-android-ringtone-picker-using-the-ringtonemanager-class/"]Continue reading...
 
Last edited by a moderator:
  • Like
Likes Greg Bernhardt
Computer science news on Phys.org
May I suggest an Insights tutorial aimed at people who would like to get started with Android programming (assuming they have some prior programming on other platforms). What are the dev toolkits available, and which ones are the easiest to get started with?

Just as an example, MIT App Inventor is easy to learn and is surprisingly versatile for a "toy" system -- but where should I go next if I want to use Android features that aren't exposed in its environment?

I think many people would have toyed with the idea of making a small utility for their own use. E.g. -- what would be required if I want to make a mini-app that would add the battery charge percentage to the screen-saver?
 
  • Like
Likes Wrichik Basu and Greg Bernhardt
Swamp Thing said:
May I suggest an Insights tutorial aimed at people who would like to get started with Android programming (assuming they have some prior programming on other platforms).
Good idea, but it cannot be one tutorial; if I write all the basics of Android in one article, it would become as long as LHC's technical design report.

One thing that kills the enthusiasm to some extent is that there is already a huge number of tutorials available on the net that will help you to get started with Android.

The biggest problem when one starts programming in Android is to set up Android Studio. If you have previously worked with Intellij IDEA and Gradle, then you will face lesser problems, but for someone going from NetBeans environment, it would be a big jump.

Anyways, thanks for the suggestion; I will surely look into it.
 
  • Like
Likes Greg Bernhardt
I added some code to the article. A ringtone picker is incomplete if it does not play the tone you choose. Therefore, I added a media player to the activity.
 
Is it possible for a standard Android app (one built on the regular dev tools) to turn on and turn off the charging current? And if so, would it work without rooting the device?
 
Swamp Thing said:
Is it possible for a standard Android app (one built on the regular dev tools) to turn on and turn off the charging current? And if so, would it work without rooting the device?
Unfortunately Android does not provide any standard way of controlling charge current. All you can do is read the battery status (charging/discharging), battery health, and charge percentage, and for these Android provides the BatteryManager class, and three broadcasts: ACTION_BATTERY_CHANGED, ACTION_BATTERY_LOW and ACTION_BATTERY_OKAY.

Even if your phone is rooted, there is no standard way of doing this, because rooting itself is considered non-standard by the Android devs. There are Magisk modules that can control charge by modifying the firmware.
 
  • Like
Likes Swamp Thing
Thread 'ChatGPT Examples, Good and Bad'
I've been experimenting with ChatGPT. Some results are good, some very very bad. I think examples can help expose the properties of this AI. Maybe you can post some of your favorite examples and tell us what they reveal about the properties of this AI. (I had problems with copy/paste of text and formatting, so I'm posting my examples as screen shots. That is a promising start. :smile: But then I provided values V=1, R1=1, R2=2, R3=3 and asked for the value of I. At first, it said...

Similar threads

  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 0 ·
Replies
0
Views
4K
  • · Replies 6 ·
Replies
6
Views
6K
  • · Replies 1 ·
Replies
1
Views
4K
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
7K
  • · Replies 75 ·
3
Replies
75
Views
6K