| 4 | //https://www.cnblogs.com/huangzijian/p/6638710.html |
| 5 | |
| 6 | public class TestJavaSDK { |
| 7 | public static void main(String[] argv) throws Exception { |
| 8 | System.out.println("hello java WechatSDK"); |
| 9 | |
| 10 | int pid = WeChatSDK.sdk.WXOpenWechat(); |
| 11 | if(pid <= 0) { |
| 12 | System.out.println("hello java WechatSDK"); |
| 13 | return; |
| 14 | } |
| 15 | |
| 16 | System.out.println("pid: " + pid); |
| 17 | |
| 18 | System.out.println("wait for..."); |
| 19 | System.in.read(); |
| 20 | |
| 21 | System.out.println(WeChatSDK.sdk.WXIsWechatAlive(pid)); |
| 22 | System.out.println(WeChatSDK.sdk.WXIsWechatSDKOk(pid)); |
| 23 | System.out.println(WeChatSDK.sdk.WXInitialize(pid)); |
| 24 | System.out.println("wait for..."); |
| 25 | System.in.read(); |
| 26 | System.out.println(WeChatSDK.sdk.WXSendTextMsg(pid, new WString("wxid_xxxx"), new WString("This is a java sdk test msg"))); |
| 27 | |
| 28 | System.in.read(); |
| 29 | } |
| 30 | } |
nothing calls this directly
no outgoing calls
no test coverage detected