分享Android微信紅包外掛程式_Android

來源:互聯網
上載者:User

本文執行個體為大家分享了Android微信紅包外掛程式,供大家參考,具體內容如下

效果圖:

具體代碼

@TargetApi(Build.VERSION_CODES.JELLY_BEAN) private void handleWindowChange(AccessibilityNodeInfo nodeInfo) {  switch (Stage.getInstance().getCurrentStage()) {   case Stage.OPENING_STAGE:    // 調試資訊,列印TTL    // Log.d("TTL", String.valueOf(ttl));     /* 如果開啟紅包失敗且還沒到達最大嘗試次數,重試 */    if (openHongbao(nodeInfo) == -1 && ttl < MAX_TTL) return;     ttl = 0;    Stage.getInstance().entering(Stage.FETCHED_STAGE);    performMyGlobalAction(GLOBAL_ACTION_BACK);    if (nodesToFetch.size() == 0) handleWindowChange(nodeInfo);    break;   case Stage.OPENED_STAGE:    ListsuccessNodes = nodeInfo.findAccessibilityNodeInfosByText("紅包詳情");    if (successNodes.isEmpty() && ttl < MAX_TTL) {     ttl += 1;     return;    }    ttl = 0;    Stage.getInstance().entering(Stage.FETCHED_STAGE);    performMyGlobalAction(GLOBAL_ACTION_BACK);    break;   case Stage.FETCHED_STAGE:    /* 先消滅待搶紅包隊列中的紅包 */    if (nodesToFetch.size() > 0) {     /* 從最下面的紅包開始戳 */     AccessibilityNodeInfo node = nodesToFetch.remove(nodesToFetch.size() - 1);     if (node.getParent() != null) {      String id = getHongbaoHash(node);       if (id == null) return;       fetchedIdentifiers.add(id);       // 調試資訊,在每次開啟紅包後列印出已經擷取的紅包      // Log.d("fetched", Arrays.toString(fetchedIdentifiers.toArray()));       Stage.getInstance().entering(Stage.OPENING_STAGE);      node.getParent().performAction(AccessibilityNodeInfo.ACTION_CLICK);     }     return;    }     Stage.getInstance().entering(Stage.FETCHING_STAGE);    fetchHongbao(nodeInfo);    Stage.getInstance().entering(Stage.FETCHED_STAGE);    break;  } }

外掛程式下載: 《分享Android微信紅包外掛程式》

本文已被整理到了《Android微信開發教程匯總》,歡迎大家學習閱讀。

希望本文所述對大家實現微信紅包功能有所協助,協助大家更好的學習Android軟體編程。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.