File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
src/main/java/com/tencent/xinge/bean Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change
1
+ package com .tencent .xinge .bean ;
2
+
3
+ import com .fasterxml .jackson .annotation .JsonValue ;
4
+
5
+ public enum ActionType {
6
+
7
+ OPEN_APP (0 , "默认打开app" ),
8
+ OPEN_ACTIVITY_BY_CLASS_NAME (1 , "显式通过类名打开activity或app本身" ),
9
+ OPEN_WEB (2 , "打开浏览器" ),
10
+ OPEN_INTENT (3 , "打开Intent" ),
11
+ OPEN_APP_BY_APK_NAME (4 ,"通过包名打开应用" ),
12
+ OPEN_ACTIVITY_BY_ACTION (5 , "隐式通过action打开activity" ), //SDK 4.1 以上支持
13
+ OPEN_RECEIVER_BY_ACTION (6 , "发送一个action广播" ), //SDK 4.1 以上支持
14
+ ;
15
+
16
+ ActionType (int type , String name ) {
17
+ this .type = type ;
18
+ this .name = name ;
19
+ }
20
+
21
+ @ JsonValue
22
+ public int getType () {
23
+ return type ;
24
+ }
25
+
26
+ public String getName () {
27
+ return name ;
28
+ }
29
+
30
+ private int type ;
31
+
32
+ private String name ;
33
+
34
+ }
Original file line number Diff line number Diff line change @@ -14,9 +14,10 @@ public class ClickAction {
14
14
15
15
@ JsonProperty (value = "action_type" , required = true , defaultValue = "1" )
16
16
@ ApiModelProperty (notes = "动作类型,1,打开activity或app本身;2,打开浏览器;3,打开Intent" )
17
- private int action_type = 1 ;
17
+ private int action_type = ActionType . OPEN_ACTIVITY_OR_APP . getType () ;
18
18
19
19
@ JsonProperty (value = "activity" , required = true , defaultValue = "" )
20
+ @ ApiModelProperty (notes = "MyActivityClassName" )
20
21
private String activity = "" ;
21
22
22
23
@ JsonProperty (value = "browser" , required = true )
You can’t perform that action at this time.
0 commit comments