Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

@param {string} sdkKey - The SDK ID for your account.
@param {string} googleProjectId - The Google project id from your Firebase console for the chosen app.

Info

googleProjectId - Can be empty String. It is not used, but it is here only for backward compatibility.

@param {string} server - The Server, which will be used for engagement, this info will be provided by account managers.
@param {string} tenantID - The ID which recognizes you at the Mapp Engage system, will be also provided by account managers.

...

Code Block
languagedart
MappSdk.setPushEnabled(true);

...

Request permission to display notification (on Android 13 and higher only)

Code Block
final result = await MappSdk.requestPermissionPostNotifications();
debugPrint("POST NOTIFICATION PERMISSION RESULT: " + result.toString());
if (!result) {
  _showMyDialog(
      "POST NOTIFICATION", "Permission result", "Permission was denied!");
}

Push notification received

...

Start geo targeting feature

To start geo feature use Mapp.startGeoFencing()

Stop geo targeting feature

...

Code Block
MappSdk.startGeoFencing().then((status) {
        debugPrint("Start Geofencing status:" + status);
        // handle successfull start of geo targeting
      }).catchError((e) {
        debugPrint("Start Geofencing error:" + e.toString());
        // handle errors
      });

Stop geo targeting feature

Code Block
MappSdk.stopGeoFencing().then((status) {
        debugPrint("Stop Geofencing status:" + status);
        // handle successfull stoping of geo targeting
      }).catchError((e) {
        debugPrint("Stop Geofencing error:" + e.toString());
        // handle errors
      });