简体   繁体   English

ARCore android 应用程序将安装在不受支持的设备上

[英]ARCore android app to be installed on Non supported device

I have created one Android App which has AR features along with some other features.我创建了一个 Android 应用程序,它具有 AR 功能以及其他一些功能。 So I wanted my app to install on all devices and the AR to be worked only on supported devices.所以我希望我的应用程序可以安装在所有设备上,并且 AR 只能在受支持的设备上运行。 Please help me how can I achieve this.请帮助我如何实现这一目标。 Thanks in advance.提前致谢。

It sounds like your app is what is called 'AR Optional' in the ARCore documentation:听起来您的应用程序在 ARCore 文档中被称为“AR Optional”:

An AR Optional app uses ARCore to augment a different functionality. AR 可选应用程序使用 ARCore 来增强不同的功能。 An AR Optional app has optional AR features, which are activated only on ARCore supported devices that have Google Play Services for AR installed. AR 可选应用程序具有可选的 AR 功能,这些功能仅在安装了 Google Play Services for AR 的支持 ARCore 的设备上激活。

AR Optional apps can be installed and run on devices that don't support ARCore. AR 可选应用程序可以在不支持 ARCore 的设备上安装和运行。 When users install an AR Optional app, the Google Play Store will not automatically install Google Play Services for AR with the app.当用户安装 AR Optional 应用时,Google Play 商店不会随应用自动安装适用于 AR 的 Google Play Services。

from: https://developers.google.com/ar/develop/java/enable-arcore (at the time of writing)来自: https://developers.google.com/ar/develop/java/enable-arcore (在撰写本文时)

There is aa utility method available in ArCoreApk to check if the device supports ARCore and if so if it is available - ArCoreApk.checkAvailability(). ArCoreApk 中有一个实用方法可用于检查设备是否支持 ARCore,如果支持 ARCore 是否可用 - ArCoreApk.checkAvailability()。

It's worth being aware that some have reported inconsistent results using this check, although it does seem to work in many cases - see the discussion here for example: https://github.com/google-ar/arcore-android-sdk/issues/162值得注意的是,有些人使用此检查报告了不一致的结果,尽管它似乎在许多情况下都有效 - 请参阅此处的讨论,例如: https://github.com/google-ar/arcore-android-sdk/issues /162

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM