草庐IT

android - GCM token 刷新以及何时将 token 发送到服务器

我正在关注GCM-Android官方指南中的集成示例。特别是我对上面链接类中的以下几行感到困惑://Youshouldstoreabooleanthatindicateswhetherthegeneratedtokenhasbeen//senttoyourserver.Ifthebooleanisfalse,sendthetokentoyourserver,//otherwiseyourservershouldhavealreadyreceivedthetoken.现在我每次启动主要Activity时都会调用Intent服务,并且我相信instanceID负责启动token刷新。每次从

android - 无法添加窗口 -- token null 不适用于应用程序

嗨,我正在尝试从View(A.xml)mainActivity中的AsyncTask的onPostExecute()膨胀View(B.xml)(其中包含微调器)MainActivity.classprotectedvoidonPostExecute(Stringresult){LayoutInflatervi=(LayoutInflater)getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);Viewv=vi.inflate(R.layout.B,null);branded_spinner=

android - 使用客户经理 token 在 webview 中登录 Google 帐户

我从客户经理那里获得了访问token以访问所有googlejava客户端api,但是我需要打开具有google的WebView,它必须通过从客户经理那里获得的访问token登录。任何人都知道这一点。我尝试使用cookie(通过this),但无法实现。如果您知道这种方式,请分享代码fragment。 最佳答案 我找到了通过使用ubertoken通过cookie执行此操作的方法。这个函数应该在单独的线程中调用publicvoidsetCookiesToWebView(AccountManageram,Accountaccount,Con

android - 检查android购买状态但返回未找到购买 token

我引用了googleplayandroidapi查看应用内商品的购买和消费状态。对于某些订单,我可以得到正确的结果,但有些会返回如下错误:error:{errors:[{domain:"global",reason:"purchaseTokenNotFound",message:"Thepurchasetokenwasnotfound.",locationType:"parameter",location:"token"}],code:404,message:"Thepurchasetokenwasnotfound."}purchasetoken是google提供的,可以造假吗?我发现

android - Mixpanel token 被曝光会有什么后果?

正如我在AndroidMixpanelSDKsetupdocumentation中读到的那样,一个token用于在应用程序启动时初始化MixPanelSDK。当我读到token在Mixpanel文档上,它说:Yourtokenispublic,andistheonlyproject-specificobjectrequiredtosenddatatoMixpanel.SinceMixpaneluserscanhavemultipleprojects,andeachprojecthasit'sownprojecttoken,wheneveryouwanttosenddatatoaspec

android - 无法使用我自己注册的应用程序的 access_token 在 "count"和 "likes"字段中获取 "comments"

主要问题:当我发送GET请求以检索someID/POSTS的数据时,例如https://graph.facebook.com/microsoft/posts?fields=comments,likes&limit=1&access_token=,无法获取“喜欢”和“评论”中的“计数”"字段使用我自己的facebook注册应用程序生成的访问token,但如果使用来自Facebook示例应用程序的访问token,则可以获得预期的数据,例如“HelloFacebookSample”。Android和FBGraphAPIExploer都会出现此问题。另外为了排查可能的原因,我在我注册的app_

android - 无法添加窗口 token android.os.BinderProxy@4250d6d8 无效;你的 Activity 在运行吗?

一位用户昨天向我发送了这份崩溃报告:android.view.WindowManager$BadTokenException:Unabletoaddwindow--tokenandroid.os.BinderProxy@4250d6d8isnotvalid;isyouractivityrunning?atandroid.view.ViewRootImpl.setView(ViewRootImpl.java:698)atandroid.view.WindowManagerImpl.addView(WindowManagerImpl.java:326)atandroid.view.Wind

android - Facebook 登录不返回用户 access_token

这是我的第一篇文章,所以如果我不遵守社区规则,请告诉我。问题来了!我一直在尝试为应用程序设置Facebook登录过程,并且我已经添加了一个GUI元素(内置的Facebook登录按钮),并让按钮继续并请求用户/通行证,授予应用程序访问用户帐户的权限。我面临的问题是,当使用以下代码从应用程序获取回调值时,我什么也没收到(没有打印值)。现在我正在打印到LogCat任意值,但是一旦打印工作,我就希望访问用户access_token和其他信息(最初不起作用)。任何帮助表示赞赏!protectedvoidonCreate(BundlesavedInstanceState){super.onCrea

android - 如何将 Firebase 自定义 token 中的其他字段检索到 "UserInfo"

我正在使用自定义token方法在firebase中进行身份验证。从服务器,我得到JWToken除了其他token字段外还有以下数据:{"uid":"user_uid","user_role":"admin"}在Firebase2.x中:我们过去常常将token字段获取为-authData.getAuth().get("user_role").toString();但在新的FirebaseSDK中:如何从token中获取数据(“user_role”的值)。NOTE:IhavetriedusingUserInfotogetthevalueof"user_role",butthereisno

android - private void sendRegistrationToServer(String token) 参数 token 从不使用

关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭5年前。Improvethisquestion我已经尝试了所有可用的答案,但都无济于事。我在这里缺少什么?privatevoidsendRegistrationToServer(Stringtoken)`{}