"dependencies": {
"channel-io-wi-synergy-sdk": "git+https://github.com/zoyi/channel-io-wi-synergy-sdk.git",
}
include ':channel-io-wi-synergy-sdk'
project(':channel-io-wi-synergy-sdk').projectDir = new File(settingsDir, '../node_modules/channel-io-wi-synergy-sdk/android')
dependencies {
compile project(':channel-io-wi-synergy-sdk')
}
import com.zoyi.channel.wi.android.ChannelPackage;
public class MyApplication extends MultiDexApplication implements ReactApplication {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ChannelPackage() // Here
);
}
}
We do not recommend calling this function often.
We recommend call track
function when login succeed or application is start up
import ChannelIO from 'channel-io-wi-synergy-sdk'
ChannelIO.track(
pluginKey,
userId,
{
age: 19,
gender: 'male'
}
).then(() => {
console.log('success')
}).catch((error) => {
console.log(error)
})
ChannelIO.track(pluginKey, userId, profile)
-
pluginKey
(string, required)Channel plugin key
-
userId
(string, required)User id for specify user. It can be login id, hashed device id, etc...
-
profile
(object map, required)Profile information to logging. Map value can be
string
,number
,boolean