Tôi cố gắng để mở một đoạn khi tôi nhấn một thông báo trên thanh thông báo. cấu trúc ứng dụng của tôi là:Làm thế nào để mở trang mảnh, khi ép một thông báo trong android
- một hoạt động cơ bản với một menu nav ngăn kéo
một số đoạn được mở từ menu
b.setOnClickListener(new OnClickListener() { @SuppressWarnings({ "deprecation", "static-access" }) public void onClick(View v) { w_nm=(NotificationManager) getActivity().getSystemService(getActivity().NOTIFICATION_SERVICE); Notification notify=new Notification(R.drawable.notnificationlogo,waternoti,System.currentTimeMillis()); Intent notificationIntent = new Intent(getActivity(), Abc.class); PendingIntent pending=PendingIntent.getActivity(getActivity(), 0,notificationIntent, 0); notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); notify.flags = Notification.DEFAULT_LIGHTS | Notification.FLAG_AUTO_CANCEL; notify.setLatestEventInfo(getActivity(),waternoti,waternoti1, pending); w_nm.notify(0, notify);
bất cứ ai có thể cho tôi biết làm thế nào để liên kết với đoạn tiếp theo trang (mã hiện tại nằm trong lớp mở rộng phân đoạn)
Người nhận phát sóng? http://developer.android.com/reference/android/content/BroadcastReceiver.html – James
Bạn có thể vui lòng xây dựng nó, tôi mới đến android –