msh_mesg_tracking_v2 0.0.4 msh_mesg_tracking_v2: ^0.0.4 copied to clipboard
An Flutter plugin for log tracking based on MesgLogTrackingV2, support Android & iOS.
msh_mesg_tracking_v2 Flutter Plugin #
1. Requirement #
- Android min API: 16
- iOS min version: 9.0
2. Install #
Get package from pub.dev pubspec.yaml
dependencies:
msh_mesg_tracking_v2: ${lastes_version}
Set permission for Android
<uses-permission android:name="android.permission.INTERNET" />
Set allow http internet for iOS info.plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
3. Usage #
3.1 Method handleAppOpen
#
Tracking install app or open app. This method called when app start. When first time open app, plugin will send log install
and log open
app.
Next time, plugin will send log open
app do not send .
Response:
- true : When send log success
- false : When send log failed
Example
Future<void> handlerAppOpen() async {
var result = await MessLogTrackingV2.handleAppOpen();
setState(() {
_log = "$_log\nhandler app open: $result";
});
}
3.2 Method handleAppQuit
#
Tracking when. close app.
Response:
- true : When send log failed
- false : When send log failed
Example
Future<void> handleAppQuit() async {
var result = await MessLogTrackingV2.handleAppQuit();
setState(() {
_log = "$_log\nhandleAppQuit: $result";
});
}
3.3 Method getLibVersion
#
This method use to get version of lib tracking. This method return lib version of lib tracking.
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> getVersionLib() async {
String version = await messLogTrackingV2.getLibVersion;
setState(() {
_log = "$_log\nGet version lib: $version";
});
}
3.4 Method getDeviceID
#
This method use to get information DeviceID of device. This method return deviceID.
Example:
// Platform messages are asynchronous, so we initialize in an async method.
Future<void> getUUID() async {
String deviceId = await messLogTrackingV2.getUUID;
setState(() {
_deviceId = deviceId;
_log = "$_log\nGet deviceId: $deviceId";
});
}
3.6 Method sendLogUpdateResource
#
Note: Updating!
This method use to log update resource.
Response:
- true : When send log failed
- false : When send log failed
4. Author #
- tuanictu97@gmail.com
- Mysoha Mobile SDK Team
License #
msh_mesg_tracking_v2 is available under the MIT license. See the LICENSE file for more info.