Once you've verified your logic with the fake provider, complete the following steps:
Change the authority in the call URI to switch to StoreAccountabilityActProvider for final confirmation. Both the fake and real providers use the same interface and response format, so you can keep your response-parsing/branching code as-is.
Kotlin
// Testing (Fake provider)
val uri = Uri.parse("content://com.sec.android.app.samsungapps.provider.FakeASAA")
// Switch to production — change the authority
val uri = Uri.parse("content://com.sec.android.app.samsungapps.provider.ASAA")
Java
// Testing (Fake provider)
Uri uri = Uri.parse("content://com.sec.android.app.samsungapps.provider.FakeASAA");
// Switch to production — change the authority
Uri uri = Uri.parse("content://com.sec.android.app.samsungapps.provider.ASAA");
- Verify you have declared read permission for the real provider in the AndroidManifest.xml file.
<!-- Fake provider access permission -->
<uses-permission android:name="com.sec.android.app.samsungapps.accesspermission.FAKE_ASAA.READ.PERMISSION" />
<!-- Real provider access permission -->
<uses-permission android:name="com.sec.android.app.samsungapps.accesspermission.ASAA_PROVIDER.READ" />
Verify that values cannot be injected using extras.
The fake provider reflects the values in extras in the response, but the real provider does not use extras to set response values. The response comes from Galaxy Store's internal state (Samsung account, minor status, whether an ASAA-supported state is selected, etc.). Therefore, to reproduce a specific user state using the real provider, you must set up a test environment (account, age, region) matching that condition.
Verify the failure response when prerequisites are not met.
When prerequisites are not met, the real and fake providers return result_code=1 (failure) along with a result_message. The fake provider returns a failure only when its read permission is not declared. In a real environment, the failure cases below can occur. You should always check result_code first, as shown in Example 6.
- No ASAA-supported state is selected →
"It is not a supported method."
- No Samsung account is registered →
"The device is not registered SA"
- Read permission (ASAA_PROVIDER.READ) has not been added to the manifest file →
"Caller has not declared ASAA provider read permission."
- To test with the real provider, your app must be installed through Galaxy Store. An app installed using ADB or Android Studio always returns
userStatus=UNKNOWN.