Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Takeya-Yuki
RubyLib
提交
0993a844
R
RubyLib
项目概览
Takeya-Yuki
/
RubyLib
8 个月 前同步成功
通知
39
Star
19
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
RubyLib
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0993a844
编写于
8月 12, 2017
作者:
T
Takeya Yuki
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Volume Control Features
上级
019927e6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
3 deletion
+32
-3
README.md
README.md
+1
-0
rubylib/build.gradle
rubylib/build.gradle
+3
-3
rubylib/src/main/AndroidManifest.xml
rubylib/src/main/AndroidManifest.xml
+3
-0
rubylib/src/main/java/yuki/media/extended/VolumeControl.java
rubylib/src/main/java/yuki/media/extended/VolumeControl.java
+25
-0
未找到文件。
README.md
浏览文件 @
0993a844
...
...
@@ -8,6 +8,7 @@ Storage IO<br/>
Command Line Support
<br/>
UI Control Features (Status Bar and Navigation Bar)
<br/>
TTS Features
<br/>
Volume Control Features
<br/>
## Current Version
1.
0-git-201708111646
rubylib/build.gradle
浏览文件 @
0993a844
...
...
@@ -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"
...
...
rubylib/src/main/AndroidManifest.xml
浏览文件 @
0993a844
...
...
@@ -8,4 +8,7 @@
</application>
<uses-permission
android:name=
"android.permission.CHANGE_WIFI_STATE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<uses-permission
android:name=
"android.permission.WRITE_SETTINGS"
/>
<uses-permission
android:name=
"android.permission.READ_SETTINGS"
/>
</manifest>
rubylib/src/main/java/yuki/media/extended/VolumeControl.java
0 → 100644
浏览文件 @
0993a844
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
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录