转载请声明:http://bbs.niuzhi.cc/thread-27-1-1.html
try {
Object service = getSystemService ("statusbar");
Class <?> statusBarManager = Class.forName
("android.app.StatusBarManager");
Method expand = statusBarManager.getMethod ("expand");
expand.invoke (service);
} catch (Exception e) {
Toast.makeText(getApplicationContext(), e.getMessage(),
Toast.LENGTH_LONG).show();
}
这里要加上权限:
<uses-permission android:name="android.permission.EXPAND_STATUS_BAR" / >