草庐IT

location_updated

全部标签

android - 打开 pdf 文件错误 : This file could not be accessed Check the location or the network and try again. Android 6 Marshmallow

我正在尝试从外部存储中获取文件,然后我必须使用intents将该文件发送给pdf阅读器。之前下面的代码运行良好,但在安装Android6(Marshmallow更新)后,我的代码无法运行并收到toast消息“无法访问此文件请检查位置或网络并重试。”(这是由于新的android运行时权限)。我刚刚尝试了所有的解决方案(内容提供商等但没有工作)任何解决方案?Filefile=newFile(getFilesDir(),"myfile.pdf");Intentintent=newIntent(Intent.ACTION_VIEW);intent.setDataAndType(Uri.from

Android ImageView变形: from Square to Circle (Solution updated)

我正在使用CircularReveal创建动画,将方形专辑封面变成圆形。以下是一个简短的fragment。intcx=mImageView.getMeasuredWidth()/2;intcy=mImageView.getMeasuredHeight()/2;//gettheinitialradiusfortheclippingcircleintinitialRadius=mImageView.getWidth()/2;//createtheanimation(thefinalradiusiszero)Animatoranim=ViewAnimationUtils.createCirc

java - 线程 "main"java.lang.NoClassDefFoundError : junit/textui/ResultPrinter After updating to Yosemite 中的异常

我最近将我的系统从Mavericks(OSX)更新到Yosemite。我曾经能够右键单击测试并运行它。现在我得到了异常/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin/java-ea-Didea.launcher.port=7541"-Didea.launcher.bin.path=/Applications/AndroidStudio.app/Contents/bin"-Dfile.encoding=UTF-8-classpath"/Applications/AndroidStudio.app/Co

android - 从 Location 对象获取卫星数量

我正在使用GPS提供商和LocationListener.onLocationChanged(Locationlocation)来接收位置修正。Documentation说,那个Location.getExtras()包含下一个键/值对:satellites-thenumberofsatellitesusedtoderivethefix但实际上我得到了一个空的额外对象——那里没有任何数据。这是否意味着我得到的是A-GPS定位而不是GPS? 最佳答案 要获取GPS引擎使用的卫星数量,您需要实现android.location.GpsS

android - Google Play 服务 GCM 10.0.1 要求将 “update” 返回到 9.0.0

我正在尝试构建我的新项目,但出现此错误:Error:Executionfailedfortask':mobile:processDebugGoogleServices'.Pleasefixtheversionconflicteitherbyupdatingtheversionofthegoogle-servicesplugin(informationaboutthelatestversionisavailableathttps://bintray.com/android/android-tools/com.google.gms.google-services/)orupdatingth

报错:Avoided redundant navigation to current location: “/login“.完美解决

需求:登陆之后才能查看主页面,否则跳转至登录页遇到的问题:一开始是打算直接在拦截器跳转路由的,发现会报错Avoidedredundantnavigationtocurrentlocation:"/login".后来灵机一动,用了全局路由守卫,完美解决request.interceptors.request.use(config=>{config.headers['Content-Type']='application/json;charset=utf-8'letuser=localStorage.getItem("user")if(!user){router.push("/login")}re

Android Fused Location 提供者迷路了

几周来我一直在测试android的新LocationAPI。总的来说,它们工作得很好,但是,新的Location提供程序经常会丢失情节。具体来说,我根据thereceivelocationupdatesexample连接了一个示例.它工作正常,并按预期收到位置更新。问题似乎出在Fused提供程序本身。在某些地区(尤其是我家附近),它完全迷路了。它会突然认为我离我所在的地方有几公里远。在我工作的地方(这是一个更密集的区域)它更准确并且总是合理地接近我实际所在的位置(在平衡模式下)。我做了很多尝试来解决这个问题,包括当我怀疑它有误时切换到PRIORITY_HIGH_ACCURACY,或者使

android - 是否有 Location Client (Google Play API) 的替代方案?

我在开发一个使用位置数据的应用程序,它需要在中国运行。这里出售的Android设备大部分根本没有安装GooglePlayAPI,唯一的方法是root手机来安装它。所以我坚持使用LocationManager,它的效果比LocationClient(GooglePlayAPI的一部分)差得多。我的问题是,LocationManager在从GPS_PROVIDER读取数据时,经常无法连接到足够多的卫星(在中国),并且在修复之间偶尔会有很大的时间间隔。从NETWORK_PROVIDER读取时,我可以获得更频繁的修复,但准确度范围为30到500。远不及LocationClientAPI质量。该

安卓解析 : Can't update local user

我的自定义ParseUser对象中有一个名为Approved的自定义bool字段。我们通过网络应用程序将此字段从false更改为true。根据文档,我应该能够在使用fetchInBackground()更改标志后更新currentUser,如下所示:ParseUser.getCurrentUser().fetchInBackground(newGetCallback(){@Overridepublicvoiddone(ParseObjectparseObject,ParseExceptione){Log.v("qwer","fetchedUser:"+((CustomUser)pars

android - Fused Location Provider - onLocationChanged 停止调用

在我们的应用程序中,我们使用融合位置提供程序(FLP)来跟踪位置。我们注意到,有时应用程序会进入位置回调停止调用的状态。该应用程序主要用于两款平板电脑(nexus7和LGG-pad8.3)。我们已经看到这两个设备上都出现了这个问题。一般来说,重置设备似乎可以缓解这个问题。我们相信我们遵循了使用FLP的大多数最佳实践。但为了以防万一,我们将这段示例代码放在一起,它说明了我们如何使用FLP。获取googleapi客户端并调用连接:m_googleApiClient=builder.addConnectionCallbacks(this).addOnConnectionFailedListe