Android 清单 VM 最小堆大小
是否有一个选项可以在 Android 清单中声明操作系统/设备所需的最小 VM 堆大小,以便 Android Market 只显示满足要求的设备的应用程序并过滤掉其余的。
我可以在应用程序启动期间检测最大 VM 堆大小,如果没有足够的可用内存,则会失败。然而,这对于用户来说会很不方便。
具体来说,我正在与朋友一起开发一款业余游戏,其中图形需要至少 16MB 但不超过 24MB 的内存。从某种意义上说,内存使用或多或少是最佳的,即在游戏的任何给定状态下仅将所需的图形加载到内存中。
Is there an option to declare the required minimal VM heap size for the OS/device in Android manifest, such that the Android Market would only display the application for devices meeting the requirement and filter out the rest.
I can detect the maximal VM heap size during the startup of the application, and fail if there is not enough available memory. However, this would be inconvenient for the users.
To be specific, I'm working on a hobby game with a friend, where graphics require at least 16MB but no more than 24MB of memory. The memory usage is more or less optimal in a sense that only required graphics are loaded in memory at any given state of the game.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保应用程序使用最大可用堆的一种方法是在应用程序的清单文件中设置 android:largeHeap=true 。但此功能适用于3.0及以上操作系统
One way which you could use to ensure that your application uses maximum of available heap is by setting android:largeHeap=true in manifest file of your application. But this feature is available for operating systems 3.0 and above