Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Launch FeedbackActivity in my application like in Android Hangouts

I would like to launch com.google.android.feedback.FeedbackActivity for my application. Like it happens in Hangouts application.

Does anyone knows which extras I need to pass to do so?

Send feedback for Hangouts

like image 224
pixel Avatar asked May 20 '13 07:05

pixel


1 Answers

So it seems that this is possible, bur report is not visible in Developer console.

@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
protected Intent prepareIcsFeedbackIntent(Activity activity, PackageManager packageManager) {
    ApplicationErrorReport localApplicationErrorReport = new ApplicationErrorReport();
    localApplicationErrorReport.packageName = activity.getPackageName();

    localApplicationErrorReport.type = 11;
    localApplicationErrorReport.installerPackageName = packageManager.getInstallerPackageName(
            localApplicationErrorReport.packageName);

    return getAppErrortIntent().putExtra(Intent.EXTRA_BUG_REPORT, localApplicationErrorReport);
}

@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)
protected Intent getAppErrortIntent() {
    Intent localIntent = new Intent(Intent.ACTION_APP_ERROR)
            .addCategory(Intent.CATEGORY_DEFAULT)
            .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    return localIntent;
}
like image 137
pixel Avatar answered Sep 28 '22 10:09

pixel