expand Notifications - Android Android OS

Android examples for Android OS:Notification

Description

expand Notifications

Demo Code


//package com.java2s;
import android.content.Context;
import java.lang.reflect.Method;

public class Main {
    @SuppressWarnings("ResourceType")
    public static void expandNotifications(Context context) {
        Object statusbar = context.getSystemService("statusbar");
        try {/*from  www.  j  a  va 2s. co  m*/
            Method m = statusbar.getClass().getMethod(
                    "expandNotificationsPanel", new Class[] {});
            m.invoke(statusbar);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

Related Tutorials