Search code examples
androidactions-on-googlegoogle-play-consoleapp-actions

How Can I test Google Actions in Android app?


Using App action test tools in Android Studio for testing Google Actions, I'm getting the error

Preview Creation Error Status Code: 400 Message: Precondition check failed.
The requested Android app package name does not have an associated project
 in Play Console. Please create a draft in Play Console and upload an app 
with package name 'com.example.yadayada'.

If I try to "upload an app with packagename ..." I'm getting the error

Upload failed
You have uploaded an APK or Android App Bundle that contains an action schema 
document in the manifest file, but the action patterns are not yet allowed. 
If you participate in a beta program, you must obtain authorization 
for your developer account

Ok, but where and how can i do it ?

Furthermore, I don't have to publish an application, this is just a draft to test the implementation of possible future Slices, and the documentation states that it is possible to do it through the Android Studio plugin.


Solution

  • Ok, got it. Hints here

    Create a new application in developer console without actions, and use its package name in the test application with actions. You can use any package names that you have already registered in Console

    android {
        defaultConfig {
            applicationId "com.example.yadayada.playconsole"
        }
    }