草庐IT

READ_SMS

全部标签

android - java.io.IOException : read failed, 套接字可能关闭或超时,读取 ret : -1 on Android 5. 0.1 Lollipop 版本

我正在与蓝牙设备建立蓝牙套接字连接,并想从设备读取字节。我已正确建立连接:try{Methodm=mmDevice.getClass().getMethod("createRfcommSocket",newClass[]{int.class});temp=(BluetoothSocket)m.invoke(mmDevice,1);}catch(Exceptione){}我正在从蓝牙设备正确读取字节。我遇到异常:java.io.IOException:readfailed,socketmightclosedortimeout,readret:-1因此,连接中断,我的设备和蓝牙设备之间的通

android - 在 android Oreo 中对传入的 SMS 运行服务

我正在开发一个应用程序,它需要在收到短信时运行一些代码(网络)。在API25及更低版本中没问题,我在list文件中注册了一个隐式receiver并在扩展了BroadcastReceiver的指定类中启动我的服务。但是,在API26中,您不能在receiver中注册android.provider.Telephony.SMS_RECEIVED,因为它不起作用。来自Android文档:Note:IfyourapptargetsAPIlevel26orhigher,youcannotusethemanifesttodeclareareceiverforimplicitbroadcasts(b

android - BroadcastReceiver 尝试在无序广播期间返回结果 - SMS 接收器

我知道有很多这样的帖子,但没有一个对我有帮助...我的list声明:短信接收者.javapublicclassSMSRecieverextendsBroadcastReceiver{@OverridepublicvoidonReceive(Contextcontext,Intentintent){Bundleextras=intent.getExtras();if(extras==null){return;}Debug.log("launched..");abortBroadcast();...hugeblockofcode...if(alotofboolsaretrue){this.

android - "read-only file system"写入SD卡出错

推送选择失败:只读文件系统当我试图在模拟器的SD卡中添加任何文件时出现此错误。任何人都可以告诉我它的解决方案是什么吗? 最佳答案 您需要授予您的应用写入外部SD卡的权限。您在“模拟器”中并不重要,模拟器是Android,因此它需要具有与在实际设备上运行时相同的权限。将此行添加到您的list中...然后你就可以开始了。 关于android-"read-onlyfilesystem"写入SD卡出错,我们在StackOverflow上找到一个类似的问题: https

android - 与 SMS 对话列表相关的 SGS-3 错误?

此问题已报告多次,但仍未解决。我在Samsung'sdeveloperssite中阅读了所有与该主题相关的消息/主题。或inStackOverflow让我再次用几句话描述整个问题:开发人员过去常常通过简单的查询来获取SMS对话列表,例如:Uri.parse("content://mms-sms/conversations/");游标cursor=context.getApplicationContext().getContentResolver().query(uri,null,null,null,null);或类似的东西。这里的关键点是URI地址:content://mms-sms/

java.lang.IllegalStateException: Unable to read meta-data for class

目录1.bug出现2.问题解决1.bug出现        给项目自定义Springboot-Starter的后,启动项目出现 java.lang.IllegalStateException:Unabletoreadmeta-dataforclass,导致项目无法启动,跟着断点打过去发现,源码加载starter的时候加载一个空字符串的className,com.kone.sp开头的都是加载成功的自定义starter2.问题解决        根据springboot自定义starter的原理,上面的className都是根据spring.factories中我们编写的类的全限定类名读取并注入的

android - 是否有任何 SMS API 可用于 android 从 android 应用程序发送 SMS?

在我的应用程序中,我想向用户发送短信,他们在没有用户交互的情况下注册到应用程序。在安卓有可能吗?yes表示如何操作,因为我不想打开android中可用的默认SMS应用程序。 最佳答案 使用android代码发送短信非常简单-SmsManagersms=SmsManager.getDefault();sms.sendTextMessage(NUMBER,null,MESSAGE,null,null);如果您想捕获与短信相关的所有事件,例如发送的短信,则可以引用@IanNewson在上面的帖子中提供的链接。谢谢

twitter - 为什么这个错误 ' - Read-only application cannot POST '

日志:12-0523:37:01.721:W/System.err(534):401:Authenticationcredentials(https://dev.twitter.com/docs/auth)weremissingorincorrect.Ensurethatyouhavesetvalidconumerkey/secret,accesstoken/secret,andthesystemclockininsync.12-0523:37:01.721:W/System.err(534):401:Authenticationcredentials(https://dev.twit

Vue报错解决[Vue warn]: Error in render: “TypeError: Cannot read property ‘state‘ of undefined“

报错Vue2项目中报错:[Vuewarn]:Errorinrender:“TypeError:Cannotreadproperty‘state’ofundefined”[Vuewarn]:Errorinmountedhook:“TypeError:Cannotreadproperty‘dispatch’ofundefined”常见原因这个错误提示通常出现在Vue组件中,它尝试读取Vuexstore的state对象,但是该对象没有被定义。这可能是由以下几个原因引起的:1.Vuexstore模块没有正确导入。可以在Vue组件中使用以下代码导入store:importstorefrom'@/stor

解决运行 AttributeError: ‘str‘ object has no attribute ‘read‘ and ‘str‘ object has no attribute ‘seek‘

跑代码的时候遇到了这种问题,如下图或者代码段中展示AttributeError:'str'objecthasnoattribute'seek'data=[self.dataset[idx]foridxinpossibly_batched_index]File"/home/amax/wj/MA-GAN-main/dataset.py",line54,in__getitem__input_image=load_img(self.image_filenames[index])File"/home/amax/wj/MA-GAN-main/dataset.py",line40,inload_imgimg