react-native-cafebazaar-intent

Bazaar Intent for various purposes (Android-Only)

MIT License

Downloads
10
Stars
8
Committers
1

react-native-cafebazaar-intent · GitHub license PRs Welcome

Getting started

$ npm i react-native-cafebazaar-intent

Mostly automatic installation (RN < 60)

$ react-native link react-native-cafebazaar-intent

Manual installation (RN < 60)

Android

  1. Open up android/app/src/main/java/com/moh3n95/bazaarIntents/MainActivity.java
  • Add import com.moh3n95.bazaarIntents.RNCafebazaarIntentPackage; to the imports at the top of the file
  • Add new RNCafebazaarIntentPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-cafebazaar-intent'
    project(':react-native-cafebazaar-intent').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-cafebazaar-intent/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-cafebazaar-intent')
    

Usage

import {view, rate, login, developerCollection} from 'react-native-cafebazaar-intent';

view("YOUR_APP_PACKAGE_NAME")
  .then(() => console.log('OK'))
  .catch((e) => console.log(e));

rate("YOUR_APP_PACKAGE_NAME")
  .then(() => console.log('OK'))
  .catch((e) => console.log(e));

login()
  .then(() => console.log('OK'))
  .catch((e) => console.log(e));

developerCollection("YOUR_DEVELOPER_ID")
  .then(() => console.log('OK'))
  .catch((e) => console.log(e));

Notice

This package is based on Bazaar Technical Documents

Contributing

Thank you for your interest in contributing! Please feel free to put up a PR for any issue or feature request.

Give me a Star

If you think this project is helpful just give me a ⭐️ Star is enough because i don't drink coffee 😃

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Author

Made with ❤️ by Mohsen Madani.

Package Rankings
Top 20.96% on Npmjs.org
Badges
Extracted from project README
GitHub license PRs Welcome