Skip to content

mz185/inmobi_cmp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InMobi CMP Plugin

A Flutter plugin to integrate the InMobi Consent Management Platform (CMP) for GDPR/CCPA compliance on Android and iOS.


Installation

dependencies:
  inmobi_cmp:
    git:
      url: https://github.com/mz185/inmobi_cmp.git
      ref: main
flutter pub get

Usage

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:inmobi_cmp/inmobi_cmp.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize CMP
  await InmobiCmp.init(
    packageId: 'com.yourcompany.yourapp',
    pCode: 'YOUR_INMOBI_PCODE',
  );

  // Listen for CMP events
  const MethodChannel('com.icon.inmobi_cmp').setMethodCallHandler((call) async {
    if (call.method == 'onCmpEvent') {
      debugPrint('CMP Event: ${call.arguments}');
    }
  });

  runApp(const MyApp());
}

// Show consent UI
await
InmobiCmp.showConsent
();

// Get consent status
final status = await
InmobiCmp.getConsentStatus
();

License

MIT License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors