如果在安卓应用中,EddyStone URL无法正确显示,你可以尝试以下解决方法:
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'com.google.android.gms:play-services-nearby:17.0.0'
然后在你的Activity中加载EddyStone URL:
WebView webView = findViewById(R.id.webview);
String url = "https://your-eddystone-url.com";
webView.loadUrl(url);
String url = "https://your-eddystone-url.com";
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse(url));
请注意,以上解决方法中的URL应该替换为你实际使用的EddyStone URL。此外,确保你已经在build.gradle文件中添加了相应的依赖项,并且在运行应用之前已经授予了适当的权限。
上一篇:安卓应用中的DropBox