Convert Java Intent to B4A

margret

Well-Known Member
Licensed User
Longtime User
Hello,

Can anyone show what this intent should be written like in B4A? :confused: I need the same action as this intent but written in B4A:

B4X:
import android.content.Intent;
Intent i = new Intent();
i.setAction( "com.bn.sdk.shop.details" );
i.putExtra( "product_details_ean" , "2940043350251" );
startActivity( i );

Thanks,

Margret
 

margret

Well-Known Member
Licensed User
Longtime User
Convert Intent

Hello

Thanks for the help. I had all ready had the code below and it kinda works? It's not working right. Your code does about the same. I am still missing something and I am not quite sure what it is. I used ADB and listed the files on the device and I don't see com.bn.sdk.shop.details. I am not sure it should be there or if it is at the web site shop this is calling.

B4X:
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "")
i.SetComponent("com.bn.sdk.shop.details")
i.putExtra("product_details_ean", "2940043350251")
StartActivity(i)

Thanks,

Margret:confused:
 
Upvote 0

margret

Well-Known Member
Licensed User
Longtime User
What it does

This is what I ended up with and it works great. Just thought I would update if anyone is was looking for similar:

B4X:
Dim i As Intent
i.Initialize(i.ACTION_VIEW,"")
i.Action = "com.bn.sdk.shop.details"
i.putExtra("product_details_ean", "2940043350251")
StartActivity(i)

Thanks,

Margret
 
Last edited:
Upvote 0
Top