TOP > Migration Guide
Table of Contents
In version 5.0.0, Mission SDK removed its dependency to RUNA SDK's Core library. If your application does not integrate RUNA SDK, then you can remove the following maven repository in project level build.gradle
file.
maven {
url 'https://raw.github.com/rakuten-ads/rakuten-ads-android/master/maven'
}
- Set your
AppCode
in the application's AndroidManifest.xml
<application>
<!-- Reward SDK Application Key -->
<meta-data
android:name="com.rakuten.gap.ads.mission_core.appKey"
android:value="{Application Key}"/>
</application>
- Remove the following
init
method from your code
RakutenReward.init(context, "<AppCode>")
- Remove the following
init
method if you are using it
RakutenReward.init("<AppCode>", "<Token>")
- Set token with the following API:
// for RID login option
RakutenReward.setRIdToken("token")
// for RAE login option
RakutenReward.setRaeToken("token")
The following methods which require Context
as parameter is deprecated in version 3.3.0. Replace these methods with the new API by removing the context argument.
RakutenAuth.getUserName(context)
RakutenRewardConfig.setOptedOut(context, optedOut)
RakutenRewardConfig.setUiEnabled(context, uiEnabled)
RakutenReward.listener
variable is deprecated in version 3.1.0. Use the following API to provide the listener instance.
NOTE: If your Activity class is extended from RakutenRewardBaseActivity
, you don't need to provide RakutenRewardListener
instance as this is already handled by RakutenRewardBaseActivity
class. You can simple override the listener methods in your Activity class
- To set
RakutenRewardListener
instance
override fun onResume() {
super.onResume()
RakutenReward.addRakutenRewardListener(listener)
}
- Call the following API to remove the listener instance to avoid memory leak
override fun onPause() {
super.onPause()
RakutenReward.removeRakutenRewardListener(listener)
}
Please refer the guide here for migration from V1 SDK.
LANGUAGE :