我的应用程序被强制关闭。请帮我。我想获取我的手机中的应用程序正在使用的权限列表。
package com.permissions;
import android.os.Bundle;
import android.app.Activity;
import android.content.pm.PackageManager;
import android.view.Menu;
import android.widget.TextView;
public class GetPermissions extends Activity {
TextView tvShow;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_get_permissions);
tvShow = (TextView) findViewById(R.id.tvshow);
tvShow.setText(PackageManager.GET_PERMISSIONS);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.get_permissions, menu);
return true;
}
}