@thealteroffice/react-native-adgeist 0.0.25-beta → 0.0.26-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Adgeist.podspec CHANGED
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
16
16
  s.source_files = "ios/**/*.{h,m,mm,cpp,swift}"
17
17
  s.private_header_files = "ios/**/*.h"
18
18
 
19
- s.dependency "AdgeistKit", '= 1.0.2-beta'
19
+ s.dependency "AdgeistKit", '= 1.0.5-beta'
20
20
 
21
21
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
22
22
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
package/README.md CHANGED
@@ -29,6 +29,8 @@ npm install @thealteroffice/react-native-adgeist
29
29
  yarn add @thealteroffice/react-native-adgeist
30
30
  ```
31
31
 
32
+ ### STEP 2: Update Configuration for Android and iOS
33
+
32
34
  ### Android Configuration
33
35
 
34
36
  Add your Adgeist publisher ID, api key and package id, as identified in the Adgeist web interface, to your app's `AndroidManifest.xml` file. To do so, add a `<meta-data>` tag with `android:name="com.adgeistkit.ads.ADGEIST_APP_ID"` and `android:name="com.adgeistkit.ads.ADGEIST_API_KEY"`
@@ -81,7 +83,9 @@ A `ADGEIST_APP_ID` and `ADGEIST_API_KEY` key with a string value of your Adgeist
81
83
  <string>69326f9fbb280f9241cabc94</string>
82
84
  ```
83
85
 
84
- ## Perform the Configuration of AdgeistProvider
86
+ ### STEP 3: React Native Configuration and Ad Placement
87
+
88
+ ### Configure AdgeistProvider
85
89
 
86
90
  Add an `AdgeistProvider` at the root level of your app.
87
91
 
@@ -97,7 +101,7 @@ export default function App() {
97
101
  }
98
102
  ```
99
103
 
100
- ## Implement the Embedding of Ad Slots
104
+ ### Implement Ad Placement
101
105
 
102
106
  Use the `HTML5AdView` component to display banner ads anywhere in your app. Place this component where you want the ads to appear and the SDK will automatically load and render the ad content.
103
107
 
@@ -1,5 +1,6 @@
1
1
  package com.adgeist.components
2
2
 
3
+ import androidx.annotation.RequiresPermission
3
4
  import com.adgeistkit.ads.AdView
4
5
  import com.facebook.react.bridge.ReadableMap
5
6
  import com.facebook.react.common.MapBuilder
@@ -25,7 +26,7 @@ class HTML5AdViewManager : SimpleViewManager<AdView>() {
25
26
  fun setAdIsResponsive(view: AdView, adIsResponsive: Boolean) {
26
27
  HTML5AdViewManagerImpl.setAdIsResponsive(view, adIsResponsive)
27
28
  }
28
-
29
+
29
30
  @ReactProp(name = "adSize")
30
31
  fun setAdSize(view: AdView, adSizeMap: ReadableMap?) {
31
32
  HTML5AdViewManagerImpl.setAdSize(view, adSizeMap)
@@ -47,12 +48,11 @@ class HTML5AdViewManager : SimpleViewManager<AdView>() {
47
48
  }
48
49
 
49
50
  @RequiresPermission("android.permission.INTERNET")
50
- fun loadAd(view: AdView, args: ReadableArray?) {
51
- val isTestMode = if (args != null && args.size() > 0) args.getBoolean(0) else false
51
+ fun loadAd(view: AdView, isTestMode: Boolean) {
52
52
  HTML5AdViewManagerImpl.loadAd(view, isTestMode)
53
53
  }
54
54
 
55
- override fun destroy(view: AdView) {
55
+ fun destroy(view: AdView) {
56
56
  HTML5AdViewManagerImpl.destroyAd(view)
57
57
  }
58
58
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thealteroffice/react-native-adgeist",
3
- "version": "0.0.25-beta",
3
+ "version": "0.0.26-beta",
4
4
  "description": "Publishers can integrate our SDK to connect their ad spaces to the AdGeist marketplace.",
5
5
  "main": "./lib/module/index.js",
6
6
  "module": "./lib/module/index.js",