# ZUpdateChecker

\---

#### 連線CallBack

```java
public class ZUpdateHandler{
    //-----------

    /***
     * 當進行檢測
     * latestVersionName  架上目前最新版
     */
    public void OnChecked(StringlatestVersionName) 


   //-----------

    /***
     *  連線失敗接口
     */
    public void OnFail(IOException e) 
    
    //----------

    /***
     *  連線成功但回覆失敗接口
     */
    public void OnFail(String response, int code) 

}
```

\---

#### 連線

```java

/***
* 進行版本檢查
* 1.http get
* ... ... ... ... ... ...
* apiURL url
* zConnectCallback callback
*/
public void check(String packageName, ZUpdateHandler zUpdateHandler) 

		Sample :

        zConnect.check("your packageName", new ZUpdateHandler () {
            
            /***
             *  連線成功但回覆失敗接口
             */
            public void OnFail(String response, int code) {
               super.OnFail(response,code);

            }
            /**
            *  onFail
            */
            @Override
            public void OnFail(IOException e) {
                super.OnFail(e);
            }

            /***
            * 當進行檢測
            * @param latestVersionName 架上目前最新版
            */
            @Override
            public void OnChecked(String latestVersionName) {
                super.OnChecked(StringlatestVersionName);
            }
        });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://noel77543.gitbook.io/ztool/connect/zupdatechecker.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
