In MainActivity, start is called and MyZeroTierEventListener is passed. Function returns 0. All is good.
Then, in the callback:
import com.zerotier.libzt.ZeroTier;
import com.zerotier.libzt.ZeroTierEventListener;
public class MyZeroTierEventListener implements ZeroTierEventListener {
public boolean isNetworkReady = false;
public boolean isOnline = false;
public void onZeroTierEvent(long id, int eventCode)
{
if (eventCode == ZeroTier.EVENT_NODE_UP) {
// Safe to ignore this callback
//System.out.println("EVENT_NODE_UP");
}
if (eventCode == ZeroTier.EVENT_NODE_ONLINE) {
// The core service is running properly and can join networks now
System.out.println("EVENT_NODE_ONLINE: nodeId=" + Long.toHexString(id));
isOnline = true;
}
if (eventCode == ZeroTier.EVENT_NODE_OFFLINE) {
// Network does not seem to be reachable by any available strategy
I am getting strange event codes.
starting with 200 with no id,
then 201 with an id,
then 240, 3 times with distinct ids for each.
None of these event codes seem to correspond to known values.
Thanks a ton!
An update on libzt.
The 1.4.X API refresh is complete, all packages have now been updated and new documentation is out. We’ll be hosting a webinar on June 2nd
where anyone is invited to ask questions or make feature requests.
Relevant links can be found here: New Documentation / Webinar · Issue #120 · zerotier/libzt · GitHub