1

通知が受信されると、通知が通知センターからクリックされるとAndroidアプリが開きますが、それに伴い、スライド式の引き出しも開きたい..これが私のコードです

IntentReceiver.class (カスタム プッシュ レシーバー)

     String action = intent.getAction();
    if (action.equals(PushManager.ACTION_NOTIFICATION_OPENED)) {
          Log.i(logTag, "User clicked notification. Message: " + intent.getStringExtra(PushManager.EXTRA_ALERT));

        //  logPushExtras(intent);
          if(!MainActivity.active){
          Intent launch = new Intent(Intent.ACTION_MAIN);
          launch.setClass(UAirship.shared().getApplicationContext(), MainActivity.class);
          launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          UAirship.shared().getApplicationContext().startActivity(launch);
          }

  }
}

そして、これは主な活動です..

public static boolean active;

以下を追加したい

 final SlidingDrawer banner = (SlidingDrawer) findViewById(R.id.slidingDrawer1);
        banner.animateOpen();

誰でも方法を教えてもらえますか..通知でアプリを開いたときにスライドドロワーを開きます。

4

1 に答える 1