是否可以以编程方式重新启动您的应用程序
我正在寻找一种在应用程序内购买后重新启动我的应用程序的方法。一旦用户升级,我需要广告消失并基本上从头开始重新加载应用程序,以便下次加载应用程序时添加所有新功能。我认为最简单的方法是退出应用程序,然后自动重新启动应用程序,但我不确定这是否可行。
I'm looking for a way to reboot my app after an in app purchase has been made. Once the user upgrades I need the ads to go away and to basically reload the app from scratch so all the new functionality will be added the next time the app loads. I'm thinking the easiest way is going to be to exit the app then automatically restart the app but I'm not sure if this is possible.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可以。相反,允许您的应用程序在购买某些东西后自行更改。对需要更改其内容的对象调用一个方法,以便它们可以收到状态更改的通知并更改自己的内部结构以符合要求。
有时,如果似乎没有办法做你想做的事,那么就有更好的方法。
No. Instead allow your app to alter itself when something has been purchased. Call a method on the objects that need to have their content changed so they can be notified of the state change and alter their own internals to conform.
Sometimes if it seems there is no way to do what you want, then there is a better way.