激活应用内计费后 OpenGL 失去表面

发布于 2024-11-15 22:02:24 字数 1392 浏览 3 评论 0原文

这是我在这里发布的问题的派生问题: 应用帐单中存在待处理意图和切换活动的问题

我现在遇到的问题与该问题的所有信息直接相关,但很可能涉及一个完全不同的主题(OpenGL),因此需要这个新问题。但请参阅那里发布的代码以获取信息。

基本问题是这样的:

我有一个带有谷歌应用内计费的 Andengine 游戏。当用户单击“购买”按钮时,您会从市场中看到一个漂亮的小弹出窗口,用于处理您的交易。这个弹出窗口效果很好,当用户提供正确的信用卡信息时,他们会被收取交易费用,我会得到一些钱。遗憾的是,完成交易后(在这种情况下完成意味着收费或决定不购买,无论哪种方式,他们都完成市场弹出窗口的操作),他们会进入黑屏,直到游戏结束为止超时或者他们强制退出。

通过分析 LogCat,我相信我已将问题范围缩小到 Andengine 活动丢失后的 OpenGL 表面,因此游戏无法加载任何相关资源。我对OpenGL一无所知,所以我不知道如何解决这个问题。我想要的只是简单的 Andengine 活动在应用内计费启动的待处理意图完成其业务后恢复或重新启动。我认为这就是导致错误的原因,尽管完整的 LogCat 转储位于上面链接的问题中:

06-16 11:20:23.635: DEBUG/dalvikvm(3807): GC_EXPLICIT freed 53K, 45% free 3710K/6663K, external 1K/513K, paused 102ms
06-16 11:20:23.885: ERROR/Surface(3807): surface (identity=158) is invalid, err=-19 (No such device)
06-16 11:20:23.905: ERROR/Surface(3807): surface (identity=158) is invalid, err=-19 (No such device)
06-16 11:20:23.905: ERROR/Surface(3807): surface (identity=158) is invalid, err=-19 (No such device)
06-16 11:20:23.905: ERROR/Adreno200-EGL(3807): egliSwapWindowSurface: unable to dequeue native buffer

如果您可以提供帮助,请告诉我,很可能您需要 Android 上的 OpenGL 经验,最好有 Andengine 的基本知识(或在至少它是如何与 OpenGL 一起工作的)。我没有对图形做任何太复杂的事情,所以这不是问题,我希望恢复的屏幕(我的“店面”)仅由各种精灵和最少量的文本组成。

谢谢

This is a derivative question of a question I have posted here:
In App BIlling trouble with Pending Intents and switching activities

The problem I have now is directly related to all of the information on that question but most likely deals with a completely different topic (OpenGL) and is therefore in need of this new question. But please refer to the code posted there for your information.

The basic problem is this:

I have an Andengine game with google's in-app-billing. When the user clicks the "buy" button, you get a nifty little popup from the Marketplace that deals with your transaction. This popup works great, when the user gives the proper credit card info they are charged for the transaction and I get some money. Sadly, upon completing a transaction (completing in this case either means charging it or deciding not to buy it, either way they complete the action as far as the Market popup is concerned) they are brought to a black screen that stays black until the game times out or they force quit it.

By analyzing the LogCat, I believe I have narrowed the problem down to the OpenGL surface behind my Andengine activity being lost and the game therefore being unable to load any of the relevant resources. I don't know anything about OpenGL so I have no idea how to fix this. All I want is for the simple Andengine activity to resume or restart after the pendingintent launched by the in-app billing has done its business. This is what I believe is causing the error although the full LogCat dump is in the question linked above:

06-16 11:20:23.635: DEBUG/dalvikvm(3807): GC_EXPLICIT freed 53K, 45% free 3710K/6663K, external 1K/513K, paused 102ms
06-16 11:20:23.885: ERROR/Surface(3807): surface (identity=158) is invalid, err=-19 (No such device)
06-16 11:20:23.905: ERROR/Surface(3807): surface (identity=158) is invalid, err=-19 (No such device)
06-16 11:20:23.905: ERROR/Surface(3807): surface (identity=158) is invalid, err=-19 (No such device)
06-16 11:20:23.905: ERROR/Adreno200-EGL(3807): egliSwapWindowSurface: unable to dequeue native buffer

Please let me know if you can help, most likely you will need experience with OpenGL on Android and preferably a basic knowledge of Andengine (or at least how it works with OpenGL). I'm not doing anything too complicated with the graphics so that's not an issue, the screen that I wish to resume (my "Store Front") consists of nothing more than various sprites and a minimal amount of text.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

掩饰不了的爱 2024-11-22 22:02:24

毕竟,它在链接的问题中得到了回答,很抱歉甚至发布了这个问题(我只是认为这可能是一个全新的问题)。

请参阅:应用程序帐单中存在待处理意图和切换活动的问题

It was answered in the linked question after all, sorry for even posting this question (I just thought it might be a totally new issue).

see: In App BIlling trouble with Pending Intents and switching activities

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文