More Related Content
Similar to Android hide (20)
Android hide
- 8. CODE!
Bundle extras = new Bundle();
extras.putParcelableArrayList(
Intent.EXTRA_RESTRICTIONS_LIST, restrictions);
result.setResult(Activity.RESULT_OK, null, extras);
result.finish();
Final steps!
- 9. UserManager usrManager = (UserManager) getSystemService(Context.
USER_SERVICE);
Bundle restrictions =
usrManager.getApplicationRestrictions(getPackageName());
restrictions != null
restrictions.get(...);
CODE! Using restrictions
- 11. Intent customIntent = new Intent();
customIntent.setClass(context, SettingsActivity.class);
extras.putParcelable(
Intent.EXTRA_RESTRICTIONS_INTENT, customIntent);
result.setResult(Activity.RESULT_OK, null, extras);
result.finish();
CODE! Custom restrictions
- 16. Exception e;
...
report = new ApplicationErrorReport();
report.type = ApplicationErrorReport.TYPE_CRASH;
...
crash= new ApplicationErrorReport.CrashInfo();
report.crashInfo = crash;
...
arn = new ApplicationErrorReport.AnrInfo();
report.arnInfo = arn;
…
CODE! ApplicationErrorReport
- 17. Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClassName("com.google.android.feedback", "com.google.
android.feedback.FeedbackActivity");
intent.putExtra(Intent.EXTRA_BUG_REPORT, report)
startActivity(intent);
CODE! Intent