Can someone help me open Samsung apps!

zoujoo

Member
Licensed User
Longtime User
1. Linking an URI on a Web page
You can make an URI for invoking a Details page of Seller and link it on your Web page.
Below is the format and an example of the URI.
samsungapps://SellerDetail/{Seller ID of Seller Office}

ex) In case of the package name of the Samsung Apps client APK
<a href="samsungapps://SellerDetail/i42ly0alca"> A Details Page
of Seller</a>
2. Making and sending an Intent
If you develop an app and make a link for invoking a Details page of seller in it, you have to
make an Intent and send it to the Samsung Apps client.
Below is a sample code.
Intent intent = new Intent();

// set data
intent.setData(Uri.parse(string_of_uri)); // The string_of_uri is an
String object including a URI like
"samsungapps://SellerDetail/{seller id of Admin site}".

// add flags
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
// The Intent.FLAG_INCLUDE_STOPPED_PACKAGES flag must be added only
if the API level of your Android SDK is over 11 like Honeycomb.

startActivity(intent);

I do it like this:
Dim Intent1 As Intent
Intent1.Initialize2("samsungapps://SellerDetail/i42ly0alca", 0)
StartActivity(Intent1)
but get error :

main_button2_click (java line: 276)
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=samsungapps://SellerDetail/i42ly0alca flg=0x20000 }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
at android.app.Activity.startActivityForResult(Activity.java:3196)
at android.app.Activity.startActivity(Activity.java:3303)
at anywheresoftware.b4a.keywords.Common.StartActivity(Common.java:670)
at b4a.examplewang.main._button2_click(main.java:276)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:167)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:155)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:151)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:59)
at android.view.View.performClick(View.java:3514)
at android.view.View$PerformClick.run(View.java:14125)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4439)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
at dalvik.system.NativeStart.main(Native Method)
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=samsungapps://SellerDetail/i42ly0alca flg=0x20000 }

hope someone can help me solve the issue.
grateful!
 
Last edited:

zoujoo

Member
Licensed User
Longtime User
something wrong.

Try this:
B4X:
Dim i As Intent
i.Initialize(i.ACTION_MAIN, "samsungapps://SellerDetail/i42ly0alca")
i.SetComponent("com.sec.android.app.samsungapps/.Main")
StartActivity(i)

I test it in old version samsung apps ,and it works ok.
I test it in the latest samsung apps ,however,it just open the main page .
What's wrong?
 
Upvote 0
Top