Intent problem

Nachtfalke75

Member
Licensed User
Longtime User
Hello,

i want to do that:

Intent testIntent = new Intent("com.quixotic.appmart.service.Service");
testIntent.putExtra("commandId", "COMMAND_OPEN_APP_DETAILS");
testIntent.putExtra("packageName", "appPackageName");
startService(testIntent);

i tried this:

Dim testIntent As Intent
testIntent.Initialize(testIntent.ACTION_MAIN, "com.quixotic.appmart.service.Service")
testIntent.PutExtra("commandId","COMMAND_OPEN_APP_ DETAILS")
testIntent.PutExtra("packageName","xxx.myapname.xxx")
StartService(testIntent)

But that don't work :(
What did I do wrong?
Can someone help me please? :)
 

Nachtfalke75

Member
Licensed User
Longtime User
It should be:
B4X:
testIntent.Initialize("com.quixotic.appmart.service.Service", "")

Now i get no response, when i press the button:
B4X:
aamIntent.Initialize("com.quixotic.adultappmart.service.AAMService","")
aamIntent.putExtra("commandId", "COMMAND_OPEN_APP_DETAILS")
aamIntent.putExtra("packageName", "com.brainforgegames.appName")
StartService(aamIntent)   

original javacode is:

Intent aamIntent = new Intent("com.quixotic.adultappmart.service.AAMService");
aamIntent.putExtra("commandId", "COMMAND_OPEN_APP_DETAILS");
aamIntent.putExtra("packageName", "some.application.package");
startService(aamIntent);
 
Upvote 0

Nachtfalke75

Member
Licensed User
Longtime User
The two code snippets are identical. Which response do you expect (you are starting a background service)?
Yes,

A installed shop should open and redirekt to our app:


To accomplish this, you can simply copy the following code in your project, wherever you need to launch AppMart:

Intent aamIntent = new Intent("com.quixotic.adultappmart.service.AAMService");
aamIntent.putExtra("commandId", "COMMAND_OPEN_APP_DETAILS");
aamIntent.putExtra("packageName", "some.application.package");
startService(aamIntent);

You will need to replace "some.application.package" with the package name of the application you want to promote. Also, you need to make sure you are making the startService call from an enclosing Context, such as the current activity.
 
Upvote 0
Top