android-branch-deep-linking-attribution icon indicating copy to clipboard operation
android-branch-deep-linking-attribution copied to clipboard

oom in LauncherActivity.java

Open billdizl opened this issue 2 years ago • 1 comments

Describe the bug

package com.eneff.branch.example.android

import io.branch.indexing.BranchUniversalObject import io.branch.referral.Branch import io.branch.referral.BranchError import io.branch.referral.util.LinkProperties

import android.util.Log; import org.json.JSONObject;

override fun onStart() {
    super.onStart()
    Branch.sessionBuilder(this).withCallback { branchUniversalObject, linkProperties, error ->
        if (error != null) {
            Log.e("BranchSDK_Tester", "branch init failed. Caused by -" + error.message)
        } else {
            Log.e("BranchSDK_Tester", "branch init complete!")
            if (branchUniversalObject != null) {
                Log.e("BranchSDK_Tester", "title " + branchUniversalObject.title)
                Log.e("BranchSDK_Tester", "CanonicalIdentifier " + branchUniversalObject.canonicalIdentifier)
                Log.e("BranchSDK_Tester", "metadata " + branchUniversalObject.contentMetadata.convertToJson())
            }
            if (linkProperties != null) {
                Log.e("BranchSDK_Tester", "Channel " + linkProperties.channel)
                Log.e("BranchSDK_Tester", "control params " + linkProperties.controlParams)
            }
        }
    }.withData(this.intent.data).init()
}

override fun onNewIntent(intent: Intent?) {
    super.onNewIntent(intent)
    Branch.sessionBuilder(this).withCallback { referringParams, error ->
        if (error != null) {
            Log.e("BranchSDK_Tester", error.message)
        } else if (referringParams != null) {
            Log.e("BranchSDK_Tester", referringParams.toString())
        }
    }.reInit()
}

}

this code can oom, because i can't remove Callback image

Steps to reproduce

nothing

Expected behavior

don't have oom in this sdk

SDK Version

5.2.7

Make and Model

realme x50

OS

12

Additional Information/Context

no

billdizl avatar Jan 18 '23 07:01 billdizl

in my project SplashActivity==LauncherActivity.java

billdizl avatar Jan 18 '23 07:01 billdizl