yandexmobile / yandex-ads-sdk-android

Other
78 stars 22 forks source link

Add Yandex Ads In Renpy engine #153

Closed Andredron closed 2 years ago

Andredron commented 2 years ago

Hello, I tried to follow your instruction https://yandex.com/dev/mobile-ads/doc/android/quick-start/android-ads-component.html to port ads to the Renpy visual novel engine. ( https://yandex.ru/search/touch/?text=renpy&lr=119167 )

For orientation, I used the Google ads example - https://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=36030

But I ran into a number of problems, the Renpy engine is written in python 3.9 (there is an old version of python 2.7, but it is slowly getting rid of it)

  1. make a release in renpai.

  2. look for the project folder in the rapt folder in the renpai

  3. copy it to the working folder of the project for Android Studio

  4. launch Android Studio.

  5. open the renpai project from the working folder of Android Studio

  6. point the SDK to the SDK from the Renpai folder.

  7. in the lower right corner runs synchronization and/or running processes. waiting for the end.

  8. open the project gradle scripts - build.gradle (module:renpyandroid) at the very end ##dependencies - add code implementation'com.yandex.android:mobmetricalib:3.13.1' implementation'com.android.installreferrer:installreferrer:1.0'

9.open the project renpyandroid - manifests - androidmanifest.xml add this code AFTER

This is what 100% works

And further, at Trying to connect banner ads, I get errors

https://yandex.ru/dev/mobile-ads/doc/android/quick-start/banner.html

in build.gradle the libraries are already registered in the project. The code com.yandex.android:mobmetricalib:3.13.1 com.android.installreferrer:installreferrer:1.0

in renpyandroid - manifests -androidmanifest.xml lines are also added.

The code

    <uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE"/>
  1. As far as I understand, the banner itself is located here:

Code // Get filename from "Open with"of another application intent intent = getIntent();

if (intent != null &&intent.getData() != null) { String filename =intent.getData().getPath(); if (filename != null) { Log.v(TAG, "Got filename:" + filename); SDLActivity.onNativeDropFile(filename); } }

RIGHT HERE !!!

}

Please, help

Andredron commented 2 years ago

Уже не надо починили

https://github.com/valery-iwanofu/rapt-yandex-ads