-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d98af6a
Showing
11 changed files
with
846 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Changelog | ||
|
||
## 2.1.2 (7 Jun, 2021) | ||
#### Android | ||
- Update native dependency to `2.1.2` | ||
|
||
## 2.1.1 (22 May, 2021) | ||
- Add **Standard banner** feature. | ||
- Use static class for `TapsellPlus` | ||
- Helps for completion and guides when using it's APIs | ||
- You can use `import {TapsellPlus}` or `import TapsellPlus` | ||
- Add **native banner** | ||
- Refactor all methods due to new android changes | ||
|
||
|
||
```js | ||
import { TapsellPlus } from 'react-native-tapsell-plus'; | ||
|
||
TapsellPlus.initialize(key); | ||
``` | ||
|
||
#### Android | ||
- Update native functionality to `2.1.1` | ||
|
||
## 1.2.7 (27 Apr, 2021) | ||
#### Android | ||
- Update native library to 1.2.5 | ||
|
||
## 1.2.4-alpha01 (26 Apr, 2021) | ||
#### Android | ||
- Update native library to 1.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# TapsellPlusSDK-ReactNativePlugin [![npm version](https://img.shields.io/npm/v/react-native-tapsell-plus?color=green&label=react-native-tapsell-plus&logo=react)](https://www.npmjs.com/package/react-native-tapsell-plus) | ||
|
||
# react-native-tapsell-plus | ||
|
||
## Getting started | ||
|
||
`$ npm install react-native-tapsell-plus --save` | ||
|
||
|
||
> If your react-native version is below `0.60`, you need to link it as well: | ||
> | ||
> ``` | ||
> $ react-native link react-native-tapsell-plus | ||
> ``` | ||
<details> | ||
<summary>Manual installation (Older react native versions)</summary> | ||
#### Android | ||
1. Open up `android/app/src/main/java/[...]/MainActivity.java` | ||
- Add `import com.reactlibrary.RNTapsellPlusPackage;` to the imports at the top of the file | ||
- Add `new RNTapsellPlusPackage()` to the list returned by the `getPackages()` method | ||
2. Append the following lines to `android/settings.gradle`: | ||
``` | ||
include ':react-native-tapsell-plus' | ||
project(':react-native-tapsell-plus').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-tapsell-plus/android') | ||
``` | ||
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: | ||
``` | ||
compile project(':react-native-tapsell-plus') | ||
``` | ||
</details> | ||
## Usage | ||
```javascript | ||
import RNTapsellPlus from 'react-native-tapsell-plus'; | ||
// TODO: What to do with the module? | ||
RNTapsellPlus; | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
|
||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.3.1' | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
buildToolsVersion "29.0.2" | ||
|
||
defaultConfig { | ||
minSdkVersion 16 | ||
targetSdkVersion 29 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
lintOptions { | ||
abortOnError false | ||
} | ||
} | ||
|
||
rootProject.allprojects { | ||
repositories { | ||
mavenCentral() | ||
} | ||
} | ||
|
||
dependencies { | ||
//noinspection GradleDynamicVersion | ||
implementation 'com.facebook.react:react-native:+' | ||
implementation 'ir.tapsell.plus:tapsell-plus-sdk-reactnative:2.1.2' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="ir.tapsell.plus"> | ||
|
||
</manifest> | ||
|
29 changes: 29 additions & 0 deletions
29
android/src/main/java/ir/tapsell/plus/RNTapsellPlusPackage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
package ir.tapsell.plus; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
import com.facebook.react.ReactPackage; | ||
import com.facebook.react.bridge.NativeModule; | ||
import com.facebook.react.bridge.ReactApplicationContext; | ||
import com.facebook.react.uimanager.ViewManager; | ||
import com.facebook.react.bridge.JavaScriptModule; | ||
|
||
public class RNTapsellPlusPackage implements ReactPackage, NoProguard { | ||
@Override | ||
public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) { | ||
return Arrays.<NativeModule>asList(new RNTapsellPlusModule(reactContext)); | ||
} | ||
|
||
// Deprecated from RN 0.47 | ||
public List<Class<? extends JavaScriptModule>> createJSModules() { | ||
return Collections.emptyList(); | ||
} | ||
|
||
@Override | ||
public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) { | ||
return Collections.emptyList(); | ||
} | ||
} |
Oops, something went wrong.