简体   繁体   English

您如何在2017 Google Play开发者控制台中找到您的Google Cast应用ID(app_id)?

[英]How do you find your Google Cast App ID (app_id) in the 2017 Google Play Developer Console?

I can no longer find the app_id that is required for the implementation of Google Play Services including Google Cast, In-app Billing, etc. 我再也找不到实现Google Play服务(包括Google Cast,应用内结算等)所需的app_id。

Example: 例:

CastOptions castOptions = new CastOptions.Builder()
        .setReceiverApplicationId(context.getString(R.string.app_id))
        .build();

It used to be obtained via the Google Play Developer Console here: 以前可以通过以下Google Play开发者控制台获取:

Google Play Developer Console 2014 Google Play开发者控制台2014

However Google recently released their new Play Console and things have been completely restructured: 但是,Google最近发布了新的Play控制台,并且内容已完全重组:

Google Play Developer Console April 2017 Google Play开发者控制台2017年4月

Where is the app_id found now on the Play Developer Console? 现在在Play开发者控制台上哪里找到app_id?

You can use the "Default Media Receiver" app id if you are okay with using the "Default Media Receiver". 如果可以使用“默认媒体接收器”,则可以使用“默认媒体接收器”应用程序ID。 This means you can't customize how the receiver looks when receiving your app, so no custom progress bar on the tv or something (as far as I understand). 这意味着您无法自定义接收器在接收您的应用程序时的外观,因此在电视等上没有自定义进度条(据我所知)。

So you can use one of the following ID's: 因此,您可以使用以下ID之一:

•For Android apps: CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID •对于Android应用: CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID

•For Chrome apps: chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID •对于Chrome应用: chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID

•For iOS apps: kGCKMediaDefaultReceiverApplicationID •对于iOS应用: kGCKMediaDefaultReceiverApplicationID

Default app_id for Default Media Receiver 默认媒体接收器的默认app_id

Or, if you need that customization you can use one of the other receiver types (Styled/Custom), but for these you will need to register for a unique app_id for a small fee at the Google Cast SDK Developer Console . 或者,如果您需要自定义,则可以使用其他一种接收器类型(样式/自定义),但是对于这些接收器,您需要在Google Cast SDK开发者控制台上支付少量费用注册唯一的app_id。

@ali-naddaf is correct, the application Id required for casting is not found on the Google Play Developer console. @ ali-naddaf是正确的,在Google Play开发者控制台上找不到转换所需的应用程序ID。 It is instead obtained by visiting https://cast.google.com/publish/#/overview and creating a new application. 而是通过访问https://cast.google.com/publish/#/overview并创建一个新应用程序来获得的。 The default is a styled media receiver. 默认值为样式化的媒体接收器。 Once you have created your application instance, you are given your application Id: 创建应用程序实例后,将获得应用程序ID:

Google Cast SDK Console Google Cast SDK控制台

You can then implement that application id in a strings xml file to set up your cast options: 然后,您可以在字符串xml文件中实现该应用程序ID,以设置您的转换选项:

CastOptions castOptions = new CastOptions.Builder()
    .setReceiverApplicationId(context.getString(R.string.app_id))
    .build();

要注册Cast的应用ID,请转到此页面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM