判断手机当前语言的方法

来源:互联网 发布:mac和windows哪个好 编辑:程序博客网 时间:2024/05/03 06:31

String language = context.getResources().getConfiguration().locale.getLanguage();

language:

zh  中文

ar 阿拉伯文

en 英文


拨打电话的方法:

String action = Intent.ACTION_CALL;  //发起通话的actionIntent intent = new Intent(action, getCallUri("1551077****"));//使用字符号码构造一个uri,然后创建intentintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);ComponentName CALL_INTENT_DESTINATION = new ComponentName("com.android.phone",         "com.android.phone.PrivilegedOutgoingCallBroadcaster");intent.setComponent(CALL_INTENT_DESTINATION);startActivity(intent);




0 0