Create an Android Ringtone Picker with Ringtonemanager Class

  • Context: Insights 
  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
  • Tags Tags
    Android Class
Click For Summary

Discussion Overview

The discussion revolves around creating an Android ringtone picker using the RingtoneManager class. It includes aspects of Android programming, user interface design, and potential extensions of functionality within Android applications.

Discussion Character

  • Technical explanation
  • Conceptual clarification
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant outlines a tutorial on creating a ringtone picker, emphasizing the use of the RingtoneManager class and the expectation of basic Android programming knowledge.
  • Another participant suggests a broader tutorial for beginners in Android programming, questioning the available development toolkits and their accessibility for new users.
  • A participant expresses concern about the feasibility of covering all Android basics in a single article due to the extensive amount of existing tutorials and the complexity of setting up Android Studio for newcomers.
  • A later post mentions the addition of a media player to the ringtone picker to enable playback of selected tones.
  • Two participants inquire about the possibility of controlling the charging current of a device through a standard Android app, questioning whether this can be achieved without rooting the device.
  • One participant responds that Android does not provide a standard method for controlling charge current, only allowing access to battery status information through the BatteryManager class and related broadcasts.
  • It is noted that even with rooting, there is no standard method for controlling charge current, although some modifications can be made through specific modules.

Areas of Agreement / Disagreement

Participants express differing views on the scope and complexity of Android programming tutorials, with some advocating for comprehensive guides while others highlight the challenges of existing resources. There is also a clear disagreement regarding the feasibility of controlling charging current through standard Android applications.

Contextual Notes

Limitations include the assumption of prior programming knowledge, the complexity of Android Studio setup, and the lack of standard methods for controlling device charging current.

Who May Find This Useful

Individuals interested in Android programming, particularly those looking to create custom applications or utilities, as well as those exploring the capabilities and limitations of Android development tools.

Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,186
Reaction score
2,694
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   Reactions: 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   Reactions: 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   Reactions: 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   Reactions: Swamp Thing

Similar threads

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