If you are a an Android Developer and want to integrate Volume Butler into your application or write an application that leverages Volume Butler here is everything you’ll need to get started.
Volume Butler Profile
This is a simple model object for a Volume Butler Profile. The items are defined as:
- ProfileId is the unique id used to tell Volume Butler what profile you want to use.
- ProfileName is the simple display name the user has given the profile.
- ProfileIcon is the name of the drawable used by the profile. This name can be used to get the actual drawable from Volume Butler for display. (See Volume Butler Helper for how to do this.)
import android.os.Parcel; import android.os.Parcelable; public class Profile implements Parcelable { public String profileId; public String profileName; public String profileIcon; public Profile(){} public Profile(String profileId, String profileName, String profileIcon) { this.profileId = profileId; this.profileName = profileName; this.profileIcon = profileIcon; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(this.profileId); dest.writeString(this.profileName); dest.writeString(this.profileIcon); } private Profile(Parcel in) { this.profileId = in.readString(); this.profileName = in.readString(); this.profileIcon = in.readString(); } public static final Parcelable.Creator<Profile> CREATOR = new Parcelable.Creator<Profile>() { public Profile createFromParcel(Parcel source) { return new Profile(source); } public Profile[] newArray(int size) { return new Profile[size]; } }; }
Volume Butler Helper
This is the helper class that will give you all the methods you need to use Volume Butler in your application. What can you do with this?
- Check if Volume Butler is installed on the users device.
- Get the profiles from Volume Butler.
- Get the icons for each profile and color them for display.
- Request Volume Butler applies a profile. Please add a descriptive name for the “yourAppName” parameters for debugging.
Happy Coding!
PS: If you use Volume Butler in your app please let me know I would love to try it out!