diff --git a/README.md b/README.md index 36804e9a040bbc53802e3e6368b23fc489583bbf..e25bf3953755e45947b3a7d048f259134f9aaef8 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Storage IO
Command Line Support
UI Control Features (Status Bar and Navigation Bar)
TTS Features
+Volume Control Features
## Current Version 1.0-git-201708111646 diff --git a/rubylib/build.gradle b/rubylib/build.gradle index 4041c9c6a0e81a31716cf6533d999139776375b9..28233154116d011ca594956771177b81ff3a999d 100644 --- a/rubylib/build.gradle +++ b/rubylib/build.gradle @@ -7,7 +7,7 @@ publish { userOrg = 'takeya-yuki-studio' //bintray注册的用户名 groupId = 'jp.ruby.rubylib' //compile引用时的第1部分groupId artifactId = 'rubylib' //compile引用时的第2部分项目名 - publishVersion = '1.0.5' //compile引用时的第3部分版本号 + publishVersion = '1.0.6' //compile引用时的第3部分版本号 desc = 'Ruby Extended Controls' website = 'https://github.com/Takeya-Yuki/RubyLib.git' } @@ -20,8 +20,8 @@ android { defaultConfig { minSdkVersion 17 targetSdkVersion 26 - versionCode 5 - versionName "1.0.5" + versionCode 6 + versionName "1.0.6" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/rubylib/src/main/AndroidManifest.xml b/rubylib/src/main/AndroidManifest.xml index 06b0d2d413291a612b383af8b1a815689871bdcc..3b579a9e7d2098f94e6ff9e98f73d83819780839 100644 --- a/rubylib/src/main/AndroidManifest.xml +++ b/rubylib/src/main/AndroidManifest.xml @@ -8,4 +8,7 @@ + + + diff --git a/rubylib/src/main/java/yuki/media/extended/VolumeControl.java b/rubylib/src/main/java/yuki/media/extended/VolumeControl.java new file mode 100644 index 0000000000000000000000000000000000000000..8e0a40930f198038f065037029bd4104ce75667a --- /dev/null +++ b/rubylib/src/main/java/yuki/media/extended/VolumeControl.java @@ -0,0 +1,25 @@ +package yuki.media.extended; + +import android.content.Context; +import android.media.AudioManager; + +/** + * Created by Akeno on 2017/08/12. + */ + +public class VolumeControl { + public void GetMaxVolume(Context context,int streamType){ + AudioManager am=(AudioManager)context.getSystemService(Context.AUDIO_SERVICE); + am.getStreamMaxVolume(streamType); + } + + public void SetVolume(Context context,int streamType,int volume,int flag){ + AudioManager am=(AudioManager)context.getSystemService(Context.AUDIO_SERVICE); + am.setStreamVolume(streamType,volume,flag); + } + + public int GetVolume(Context context, int streamType){ + AudioManager am=(AudioManager)context.getSystemService(Context.AUDIO_SERVICE); + return am.getStreamVolume(streamType); + } +}