|
@ -30,16 +30,18 @@ public class MobileBasic extends Plugin {
|
30
|
30
|
throw new Exception(Messages.EXCEPTION_PARAM);
|
31
|
31
|
}
|
32
|
32
|
String sn = param.getString(0);
|
33
|
|
int flag = param.getInt(1);
|
34
|
|
call(sn, flag);
|
|
33
|
String autoCall = param.getString(1);
|
|
34
|
call(sn, "true".equals(autoCall));
|
|
35
|
MobileBasic plugin = wademobile.getPluginManager().getPlugin(MobileBasic.class);
|
|
36
|
plugin.call("13712341234", true);
|
35
|
37
|
}
|
36
|
38
|
|
37
|
39
|
/**
|
38
|
40
|
* 呼出电话
|
39
|
41
|
* @param sn
|
40
|
42
|
*/
|
41
|
|
public void call(String sn,int flag) {
|
42
|
|
if(flag==1){
|
|
43
|
public void call(String sn,boolean autoCall) {
|
|
44
|
if(autoCall){
|
43
|
45
|
/**权限:android.permission.CALL_PHONE*/
|
44
|
46
|
Intent intent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+ sn));
|
45
|
47
|
this.context.startActivity(intent);
|