* Checks whether the given request code is a valid code by masking it with 0xffff0000. Throws * an {@linkIllegalArgumentException} if the code is not valid. */ static voidcheckForValidRequestCode(int requestCode) { if ((requestCode &0xffff0000) !=0) { throw new IllegalArgumentException("...
37});38}3940/**41* 当从其他页面返回来的时候,会调用此方法42*/43@Override44protectedvoidonActivityResult(intrequestCode,intresultCode, Intent data) {45super.onActivityResult(requestCode, resultCode, data);46if(requestCode ==REQUEST_CODE) {47if(resultCode ==ReceiveAcitivity.RUSULT_CODE_1) {48Toast...
getText().toString()); 34 // 执行跳转 35 startActivityForResult(intent, REQUEST_CODE); 36 } 37 }); 38 } 39 40 /** 41 * 当从其他页面返回来的时候,会调用此方法 42 */ 43 @Override 44 protected void onActivityResult(int requestCode, int resultCode, Intent data) { 45 super....
private final static String[]PERMISSIONS=new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE,Manifest.permission.ACCESS_FINE_LOCATION}; private final static int REQUEST_CODE_PERMISSION=1; private final static int REQUEST_CODE_SETTINGS=2; private TextViewtextView; @Override protected void onActivityResu...
publicclassMainActivityextendsAppCompatActivity{publicfinalstaticintSCANNING_REQUEST_CODE=1;privateTextView textView;protectedvoidonCreate(Bundle savedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);textView=(TextView)findViewById(R.id.textView);textView.setOnClick...
// RequestCode是获取返回用的!privatefinalintPERMISSION_REQUEST_CODE=1; // 方法,获取位置权限protectedvoidrequestFineLocationPermission(){String permission=Manifest.permission.ACCESS_FINE_LOCATION;if(ContextCompat.checkSelfPermission(this,permission)!=PackageManager.PERMISSION_GRANTED){// 此时还没有权限!Activity...
@OverrideprotectedvoidonActivityResult(intrequestCode,intresultCode,Intentdata){super.onActivityResult(requestCode,resultCode,data);if(requestCode==PICK_IMAGE_REQUEST&&resultCode==RESULT_OK&&data!=null){UriimageUri=data.getData();cropImage(imageUri);}}privatevoidcropImage(UriimageUri){IntentcropIntent=new...
[pos]); // 根据下载地址构建一个Uri对象 Request down = new Request(uri); // 创建一个下载请求对象,指定从哪里下载文件 down.setTitle(ApkConstant.NAME_ARRAY[pos] + "下载信息"); // 设置任务标题 down.setDescription(ApkConstant.NAME_ARRAY[pos] + "安装包正在下载"); // 设置任务描述 // ...
任何建议或者 Bug 欢迎给我们反馈,微信公众号:codekk 应用评分 4.5 共323个评分 详细信息 应用包名:cn.trinea.android.developertools 更新时间:1天前 支持ROM:4.4+ 开发者名称:杭州时光闪耀科技有限公司 权限信息 · android.permission.REQUEST_INSTALL_PACKAGES ...
(requestCode == CHOOSE_LOCK_REQUEST|| requestCode == ENABLE_ENCRYPTION_REQUEST) {Log.d("lock", "CHOOSE_LOCK_REQUEST mForFace="+mForFace +" mForFingerprint="+mForFingerprint);if (resultCode != RESULT_CANCELED || mForChangeCredRequiredForBoot) {//FACE_UNLOCK_SUPPORT startif (mForFace) ...