0

I've been having trouble fixing this issue for weeks now, and still no luck. My app is keep getting rejected from PlayStore. I read https://support.google.com/faqs/answer/9267555?hl=en and I tried option-1 adding exported=false in every activity, but it didn't work. Then I tried option-2.

Activity 1

val intentProduct = Intent(context,ProductView::class.java)
    intentProduct.putExtra("data",gson.toJson(item))
    startActivity(intentProduct)

Activity 2

if (callingActivity != null && callingActivity!!.packageName == BuildConfig.APPLICATION_ID){
    var product = gson.fromJson(intent.getStringExtra("data"), Product::class.java)
    //other stuff
}

But when I try this I'm always getting NullPointerException because the callingActivity is always null, so because of that, it's going into the else condition.

Lucius
  • 1,246
  • 1
  • 8
  • 21
Sarath Siva
  • 547
  • 3
  • 14

1 Answers1

1

actually, the issue was in one of the payment libraries I was using, RazorPay, I simply fixed it by updating the library to the latest version, Posted my answer here https://stackoverflow.com/a/66499225/13373099

Sarath Siva
  • 547
  • 3
  • 14