Open ToxicantX opened 9 months ago
import com.alibaba.sdk.android.push.popup.PopupNotifyClick; import com.alibaba.sdk.android.push.popup.PopupNotifyClickListener; import com.aliyun.ams.push.AliyunPushEventSender;
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); (new PopupNotifyClick(new PopupNotifyClickListener() { @Override public void onSysNoticeOpened(String title, String summary, Map<String, String> extMap) { WritableMap writableMap = new WritableNativeMap(); writableMap.putString("title", title); writableMap.putString("summary", summary); try { if (extMap != null && !extMap.isEmpty()) { JSONObject extra = new JSONObject(); for (Map.Entry<String, String> entry: extMap.entrySet()) { extra.put(entry.getKey(), entry.getValue()); } writableMap.putString("extra", extra.toString()); } } catch (JSONException e) { e.printStackTrace(); } AliyunPushEventSender.sendEvent("onNotificationOpened", writableMap); } })).onCreate(this, this.getIntent()); }
找不到这个