草庐IT

with_numbers

全部标签

android - WiFi 直接 : How to Connect and interact with peers programmatically without user intervention?

我们正在尝试构建一个应用程序,我们需要WiFiDirect应用程序自动检查对等点并在没有任何用户干预的情况下进行连接?我看到我们在developers.android中确实有一个带有演示的演示版本,但它有来自用户的Activity来检查和连接。感谢任何有关如何执行此操作/方向的帮助。谢谢。 最佳答案 通过wifidirect发送数据时,您应该考虑一些事项连接后,一台设备将成为群组所有者,另一台将成为客户端群主将拥有固定IP地址即192.168.49.1您只会在运行时知道哪个成为组所有者。连接后,您必须从客户端向服务器发送一些数据,其

android - 将冒号添加到 InputType.TYPE_CLASS_NUMBER 键盘

如何将冒号(:)添加到输入类型InputType.TYPE_CLASS_NUMBER的软键盘目前我有以下代码:NumberKeyListenerkeyListener=newNumberKeyListener(){publicintgetInputType(){returnInputType.TYPE_CLASS_NUMBER;}@Overrideprotectedchar[]getAcceptedChars(){returnnewchar[]{'0','1','2','3','4','5','6','7','8','9','.',':','-',','};}};mytext.setK

android - 为什么这个 "You must have AdActivity declared in AndroidManifest.xml with configChanges."

我不知道这个错误是怎么来的,当我尝试了很多次时,所以我在stackoverflow中看到了不同的帖子,但我没有得到解决方案。所以在此之后我发布了这个问题。我有一个正在开发的2.3.3android应用程序,我想在其中添加Admob广告。我的错误:这是我的java文件>packagecom.example.admobtest;importandroid.os.Bundle;importandroid.app.Activity;importcom.google.ads.*;publicclassMainActivityextendsActivity{privateAdViewadView;

java - 安卓 : How to Check if incoming SMS number exist in contact phone in BroadcastReceiver and block is number not exist

我想当有号码未联系的传入短信时,然后block中的文本,通过检查是否有任何号码不在电话簿中来确定。我有一个代码检查号码存在,但是我在BroadcastReceiver类中移动代码时出错?如何在onReceive中调用方法contactExists?publicbooleancontactExists(Contextcontext,Stringnumber,ContentResolvercontentResolver){Cursorphones=contentResolver.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI

android - NoClassDefFoundError : Failed resolution of :Ljavax/XML/stream/XMLEventFactory with Apache POI on Android

我一直在尝试使用android上的apachepoi库将excel表写入外部存储,但每次运行该应用程序时都会出现错误Failedresolutionof:Ljavax/XML/stream/XMLEventFactory我看了poi的官方文档,谷歌了,没用。我也用jdk1.8,还是报错。 最佳答案 由于直接使用ApachePOI中的库时会遇到各种问题,目前ApachePOI无法直接在Android上运行。有两个项目试图使在Android上使用ApachePOI成为可能:https://github.com/andruhon/andr

android - JNI 在应用程序中检测到错误 : JNI GetMethodID called with pending exception java. lang.ClassNotFoundException:没有找到类

我收到以下错误:JNIDETECTEDERRORINAPPLICATION:JNIGetMethodIDcalledwithpendingexceptionjava.lang.ClassNotFoundException:Didn'tfindclass"package.name.class"onpath:DexPathList[[zipfile"/system/framework/sample.jar"],nativeLibraryDirectories=[/vendor/lib,/system/lib]]JNIDETECTEDERRORINAPPLICATION:JNIGetMeth

android - 如何将多个 project_number/sender id 放入 google-services.json

我希望能够在我的Android应用程序中添加多个发件人ID。来自https://developers.google.com/cloud-messaging/concept-optionsGCMallowsmultiplepartiestosendmessagestothesameclientapp.Forexample,supposetheclientappisanarticlesaggregatorwithmultiplecontributors,andeachofthemshouldbeabletosendamessagewhentheypublishanewarticle.Thi

android - 错误 : The file name must end with . xml 或 .png

即使我没有选择photothumb.db作为可绘制对象,我还是收到一条错误消息,提示photothumb.db应以.xml或.png结尾我的profilesmaller图片是png类型下面是我的代码下面是我的Gradle控制台消息FAILURE:Buildfailedwithanexception.*Whatwentwrong:Executionfailedfortask':app:mergeDebugResources'.>C:\Users\CharleneMarie\AndroidStudioProjects\Guest\app\src\main\res\drawable\phot

android - 数据绑定(bind)中的 msg :Cannot find the getter for attribute 'android:text' with value type java. lang.String?

我正在尝试在edittext中使用数据绑定(bind),早上它工作正常但突然出现错误:****/databindingerror****msg:Cannotfindthegetterforattribute'android:text'withvaluetypejava.lang.Stringonandroid.widget.EditText.file:/home/itstym/ApkProjects/Reminder/app/src/main/res/layout/activity_main.xmlloc:20:4-34:40****\databindingerror****第20:4

android - Expo with Android Studio 模拟器错误 : "Error running adb: This computer is not authorized to debug the device"

我正在尝试将AndroidStudio模拟器连接到我的expo应用程序,但我收到此错误消息:Couldn'tstartprojectonAndroid:Errorrunningadb:Thiscomputerisnotauthorizedtodebugthedevice.PleasefollowtheinstructionsheretoenableUSBdebugging:https://developer.android.com/studio/run/device.html#developer-device-options.IfyouareusingGenymotiongotoSet