Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Takeya-Yuki
RubyLib
提交
1f45e547
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 搜索 >>
提交
1f45e547
编写于
9月 21, 2019
作者:
Y
Yuki Takeya
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add WeChat Pay HTML5 Support
上级
624c48bf
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
40 addition
and
14 deletion
+40
-14
.idea/caches/build_file_checksums.ser
.idea/caches/build_file_checksums.ser
+0
-0
.idea/caches/gradle_models.ser
.idea/caches/gradle_models.ser
+0
-0
README.md
README.md
+1
-1
app/src/main/java/jp/ruby/rubylibrary/MainActivity.java
app/src/main/java/jp/ruby/rubylibrary/MainActivity.java
+2
-2
io/src/main/java/yuki/msg/extended/NotificationController.java
...c/main/java/yuki/msg/extended/NotificationController.java
+26
-7
io/src/main/java/yuki/msg/extended/YukiPushService.java
io/src/main/java/yuki/msg/extended/YukiPushService.java
+1
-1
pm/build.gradle
pm/build.gradle
+1
-1
webviewex/build.gradle
webviewex/build.gradle
+2
-2
webviewex/src/main/java/yuki/control/extended/WebViewEx.java
webviewex/src/main/java/yuki/control/extended/WebViewEx.java
+7
-0
未找到文件。
.idea/caches/build_file_checksums.ser
浏览文件 @
1f45e547
无法预览此类型文件
.idea/caches/gradle_models.ser
浏览文件 @
1f45e547
无法预览此类型文件
README.md
浏览文件 @
1f45e547
...
...
@@ -12,7 +12,7 @@ Volume Control Features<br/>
Yuki Push Service
<br/>
## Current Version
2.
1.1-git-20190
823
<br/>
2.
1.1-git-20190
921
<br/>
All-in-One Package(Depreciated):
[
![Download
](
https://api.bintray.com/packages/takeya-yuki-studio/maven/rubylib/images/download.svg
)
](https://bintray.com/takeya-yuki-studio/maven/rubylib/_latestVersion)
AjaxLib Package:
[
![Download
](
https://api.bintray.com/packages/takeya-yuki-studio/maven/ajaxlib/images/download.svg
)
](https://bintray.com/takeya-yuki-studio/maven/ajaxlib/_latestVersion)
...
...
app/src/main/java/jp/ruby/rubylibrary/MainActivity.java
浏览文件 @
1f45e547
...
...
@@ -44,8 +44,8 @@ public class MainActivity extends Activity {
Intent
srv
=
new
Intent
(
"AAA"
);
srv
.
setPackage
(
getPackageName
());
startService
(
srv
);
NotificationController
.
Notify
(
getApplicationContext
(),
1
,
R
.
mipmap
.
ic_launcher
,
pi
,
"Ticker"
,
"Title"
,
"Content"
,
Notification
.
FLAG_NO_CLEAR
|
Notification
.
FLAG_AUTO_CANCEL
);
NotificationController
.
Notify
(
getApplicationContext
(),
1
,
R
.
mipmap
.
ic_launcher
,
pi
,
"Ticker2"
,
"Title2"
,
"Content2"
,
Notification
.
FLAG_NO_CLEAR
|
Notification
.
FLAG_AUTO_CANCEL
);
NotificationController
.
Notify
(
getApplicationContext
(),
"APP"
,
1
,
R
.
mipmap
.
ic_launcher
,
pi
,
"Ticker"
,
"Title"
,
"Content"
,
Notification
.
FLAG_NO_CLEAR
|
Notification
.
FLAG_AUTO_CANCEL
);
NotificationController
.
Notify
(
getApplicationContext
(),
"APP"
,
1
,
R
.
mipmap
.
ic_launcher
,
pi
,
"Ticker2"
,
"Title2"
,
"Content2"
,
Notification
.
FLAG_NO_CLEAR
|
Notification
.
FLAG_AUTO_CANCEL
);
List
<
PermissionInfo
>
pis
=
pm
.
GetPermissions
(
getApplicationContext
());
String
data
=
""
;
for
(
PermissionInfo
Pi:
...
...
io/src/main/java/yuki/msg/extended/NotificationController.java
浏览文件 @
1f45e547
package
yuki.msg.extended
;
import
android.app.Notification
;
import
android.app.NotificationChannel
;
import
android.app.NotificationManager
;
import
android.app.PendingIntent
;
import
android.content.Context
;
import
android.os.Build
;
/**
* Created by Akeno on 2017/08/28.
*/
public
class
NotificationController
{
public
static
void
Notify
(
Context
context
,
int
id
,
int
icon
,
PendingIntent
pendingIntent
,
String
ticker
,
String
title
,
String
content
,
int
flags
){
NotificationManager
nm
=(
NotificationManager
)
context
.
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
Notification
.
Builder
nb
=
new
Notification
.
Builder
(
context
);
public
static
void
Notify
(
Context
context
,
String
channel_id
,
int
id
,
int
icon
,
PendingIntent
pendingIntent
,
String
ticker
,
String
title
,
String
content
,
int
flags
){
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
O
)
{
NotificationManager
nm
=
(
NotificationManager
)
context
.
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
Notification
.
Builder
nb
=
new
Notification
.
Builder
(
context
);
nb
.
setSmallIcon
(
icon
).
setContentIntent
(
pendingIntent
).
setTicker
(
ticker
).
setContentTitle
(
title
).
setContentText
(
content
).
setWhen
(
System
.
currentTimeMillis
());
Notification
notification
=
nb
.
build
();
Notification
notification
=
nb
.
build
();
notification
.
flags
=
flags
;
nm
.
notify
(
id
,
notification
);
}
else
{
String
des
=
"101"
;
NotificationChannel
channel
=
new
NotificationChannel
(
channel_id
,
des
,
NotificationManager
.
IMPORTANCE_MIN
);
NotificationManager
nm
=
(
NotificationManager
)
context
.
getSystemService
(
Context
.
NOTIFICATION_SERVICE
);
nm
.
createNotificationChannel
(
channel
);
Notification
notification
=
new
Notification
.
Builder
(
context
,
channel_id
)
.
setContentTitle
(
title
)
.
setContentText
(
content
)
.
setSmallIcon
(
icon
)
.
setStyle
(
new
Notification
.
MediaStyle
())
.
setAutoCancel
((
flags
&
Notification
.
FLAG_AUTO_CANCEL
)
==
Notification
.
FLAG_AUTO_CANCEL
)
.
build
();
notification
.
flags
=
flags
;
nm
.
notify
(
id
,
notification
);
nm
.
notify
(
id
,
notification
);
}
}
}
io/src/main/java/yuki/msg/extended/YukiPushService.java
浏览文件 @
1f45e547
...
...
@@ -28,7 +28,7 @@ public abstract class YukiPushService extends Service {
public
void
MessagePushed
(
String
msg
){
Intent
i
=
new
Intent
(
Intent
.
ACTION_VIEW
,
Uri
.
parse
(
"msg://msg"
));
PendingIntent
pi
=
PendingIntent
.
getActivity
(
getApplicationContext
(),
0
,
i
,
PendingIntent
.
FLAG_UPDATE_CURRENT
);
NotificationController
.
Notify
(
getApplicationContext
(),
GetServiceID
(),
GetIcon
(),
pi
,
NotificationController
.
Notify
(
getApplicationContext
(),
"SERV"
,
GetServiceID
(),
GetIcon
(),
pi
,
"Yuki Push Service"
,
"Yuki Push Service"
,
msg
,
Notification
.
FLAG_NO_CLEAR
|
Notification
.
FLAG_AUTO_CANCEL
);
}
...
...
pm/build.gradle
浏览文件 @
1f45e547
...
...
@@ -5,7 +5,7 @@ publish {
userOrg
=
'takeya-yuki-studio'
//bintray注册的用户名
groupId
=
'jp.ruby.rubylib'
//compile引用时的第1部分groupId
artifactId
=
'packagemanager'
//compile引用时的第2部分项目名
publishVersion
=
'2.1.
0
'
//compile引用时的第3部分版本号
publishVersion
=
'2.1.
1
'
//compile引用时的第3部分版本号
desc
=
'Ruby Extended Controls - PackageManager'
website
=
'https://github.com/Takeya-Yuki/RubyLib.git'
}
...
...
webviewex/build.gradle
浏览文件 @
1f45e547
...
...
@@ -5,7 +5,7 @@ publish {
userOrg
=
'takeya-yuki-studio'
//bintray注册的用户名
groupId
=
'jp.ruby.rubylib'
//compile引用时的第1部分groupId
artifactId
=
'webviewex'
//compile引用时的第2部分项目名
publishVersion
=
'2.1.
0
'
//compile引用时的第3部分版本号
publishVersion
=
'2.1.
2
'
//compile引用时的第3部分版本号
desc
=
'Ruby Extended Controls - WebViewEx'
website
=
'https://github.com/Takeya-Yuki/RubyLib.git'
}
...
...
@@ -17,7 +17,7 @@ android {
defaultConfig
{
minSdkVersion
21
targetSdkVersion
29
versionCode
2
versionCode
3
versionName
"2.0"
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
...
...
webviewex/src/main/java/yuki/control/extended/WebViewEx.java
浏览文件 @
1f45e547
...
...
@@ -550,6 +550,9 @@ public class WebViewEx extends WebView{
externalSchemeIntent
=
new
Intent
(
Intent
.
ACTION_SENDTO
,
uri
);
externalSchemeIntent
.
setPackage
(
"com.whatsapp"
);
}
else
if
(
scheme
.
equals
(
"weixin"
)){
externalSchemeIntent
=
new
Intent
(
Intent
.
ACTION_VIEW
,
uri
);
}
else
{
externalSchemeIntent
=
null
;
}
...
...
@@ -572,6 +575,10 @@ public class WebViewEx extends WebView{
}
}
if
(
uri
.
getHost
().
contains
(
"wx.tenpay.com"
)){
return
false
;
}
// route the request through the custom URL loading method
view
.
loadUrl
(
url
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录