使用服务帐户访问Google Play Developer API时出现以下错误:
用于调用Google Play Developer API的项目ID尚未在Google Play开发者控制台中进行链接.
服务帐户电子邮件和.p12文件是使用服务帐户选项生成的APIs&Auth -> Credentials.Google Play Developer API中的应用程序使用google文档中提到的项目ID链接到项目.
但是,当我尝试使用Publishing API时,我仍然收到此错误.我正在寻找这个错误的解决方案以及使用Google Publishing API为Java客户端使用Google Play Developer API发布APK的一步一步的流程.我在用androidpublisher_v2_public.
BillingService类的注释建议:
您应该在使用之前修改和混淆此代码.
OK,但是什么必须进行修改?
班级名称?TAG用于记录?方法名称和数据成员?逻辑和程序流程本身?其他?
换句话说,我可以理解混淆的必要性,但是如何在不重写所有内容的情况下实现推荐(可能存在比不修改任何内容更糟糕的错误)?
我用下面的方式启动wpf任务
var newTask = Task.Factory.StartNew(() =>
{
fcStartSubPageCrawl(srMainSiteURL, srMainSiteId);
}).ContinueWith((t) =>
{
var aggException = t.Exception.Flatten();
foreach (var exception in aggException.InnerExceptions)
csPages.LogException(exception.ToString());
},
TaskContinuationOptions.OnlyOnFaulted);
Run Code Online (Sandbox Code Playgroud)
现在,当我检查任务状态
像这样(分配给任务列表的新任务):
if (tskLocalTaskList[i].IsCompleted == false)
Run Code Online (Sandbox Code Playgroud)
我看到任务状态= WaitingForActivation
这是什么意思 ?为什么它等待激活?
C#4.0 WPF
脚本:我即将完成谷歌Playstore应用内结算实施.我使用月度或年度订阅来向我的消费者收费.
问题:我似乎找不到从活动状态删除订阅的方法,因为取消只会停止计费发生.这不允许QA在不为每个测试创建帐户或等待订阅期结束的情况下彻底测试购买过程.
问题:我错过了什么或者错了什么?如果是这样,它是什么?如果没有,应该采取什么措施让QA进行适当的测试?
android subscription in-app-purchase in-app-billing google-play
发送HTTP GET请求我需要帮助.我的代码如下:
URL connectURL = new URL("url");
HttpURLConnection conn = (HttpURLConnection)connectURL.openConnection();
conn.setDoInput(true);
conn.setDoOutput(true);
conn.setUseCaches(false);
conn.setRequestMethod("GET");
conn.connect();
conn.getOutputStream().flush();
String response = getResponse(conn);
Run Code Online (Sandbox Code Playgroud)
但它失败了getResponse(conn);为什么?
我正在尝试调用 api Purchases.products: get来验证您的购买,它会产生这样的结果
{
"error": {
"errors": [
{
"domain": "androidpublisher",
"reason": "permissionDenied",
"message": "The current user has insufficient permissions to perform the requested operation."
}
],
"code": 401,
"message": "The current user has insufficient permissions to perform the requested operation."
}
}
Run Code Online (Sandbox Code Playgroud)
这里的文档说明了你可以做什么
收到的令牌不仅仅适用于任何其他 api 的购买检查,它返回结果(Inappproducts: list is work)
验证 url 构建正确,因为如果您将令牌客户端连接到服务器,那么此 api 也可以工作 - 但我需要一个服务器来进行服务器身份验证
scopes = ['https://www.googleapis.com/auth/androidpublisher']
authorization = Google::Auth.get_application_default(scopes)
uri = "https://www.googleapis.com/androidpublisher/v3/applications/#{ENV['ANDROID_PACKAGE_NAME']}/purchases/products/#{purchasable.purchase_uuid}/tokens/#{purchase_token}?access_token=#{authorization.fetch_access_token!['access_token']}" …Run Code Online (Sandbox Code Playgroud) authentication server-to-server google-oauth android-inapp-purchase
我正在尝试使用Google API .NET Client Library 从我的ASP.NET Web服务器访问Purchase Status API,这是使用Purchase API v1.1的推荐方法.但是,此API 的" 授权"页面建议直接向Google的OAuth2页面发送Web请求,而不是使用相应的客户端库.
好吧,我尝试了两种方法,我想到了所有变化,它们都导致"远程服务器返回错误:(400)错误请求.".
现在我做了什么来达到我的观点.首先,我在授权页面的创建API控制台项目下完成了所有步骤1-8.接下来,我按照那里的描述生成了刷新令牌.在刷新令牌生成期间,我选择了与用于发布我的Android应用程序相同的Google帐户(现在处于已发布的测试版状态).
接下来我在Visual Studio中创建了一个用于测试目的的控制台C#应用程序(可能是控制台应用程序有问题吗?)并尝试使用此代码调用Purchase API(在某些Google API示例中找到):
private static void Main(string[] args)
{
var provider =
new WebServerClient(GoogleAuthenticationServer.Description)
{
ClientIdentifier = "91....751.apps.googleusercontent.com",
ClientSecret = "wRT0Kf_b....ow"
};
var auth = new OAuth2Authenticator<WebServerClient>(
provider, GetAuthorization);
var service = new AndroidPublisherService(
new BaseClientService.Initializer()
{
Authenticator = auth,
ApplicationName = APP_NAME
});
var request …Run Code Online (Sandbox Code Playgroud) android google-api in-app-purchase oauth-2.0 google-api-dotnet-client
android ×5
google-api ×2
google-play ×2
c# ×1
get ×1
google-oauth ×1
http ×1
json ×1
oauth-2.0 ×1
parsing ×1
subscription ×1
task ×1