草庐IT

Call-time

全部标签

Android:是否有来自 Intent.ACTION_TIME_CHANGED 的任何其他信息?

Intent.ACTION_TIME_CHANGED是否提供了任何其他信息?getData()或getExtras()中没有任何内容。我想知道:手机设置新时间前的时间;谁更改了时间:用户(手动)还是电话运营商?欢迎使用任何其他方式获取这些信息! 最佳答案 我查看了Android的源代码,这个广播没有任何额外内容。因此,无法了解此信息。 关于Android:是否有来自Intent.ACTION_TIME_CHANGED的任何其他信息?,我们在StackOverflow上找到一个类似的问题:

android.permission.CALL_PHONE : making single apk for phones and tablets:

我希望我的应用可用于手机和平板电脑。手机和平板电脑版本之间的唯一区别是:在“手机”版本中,我的应用程序有按钮,可以调用特定号码。我的问题是什么:为了能够打电话,我需要添加list文件的权限-此权限使应用程序与平板电脑不兼容。如果我删除权限,应用程序无法调用正在电话上启动的电话。如何制作一个同时支持手机和平板电脑并允许通过手机调用电话的应用程序? 最佳答案 Play商店中的单个应用程序可以有多个apk,很多应用程序都使用它来定制体验。如果您在Play商店页面上看到提到的Android版本各不相同,那么您就知道他们采用了这种方法。你可以

java - Android java.time.LocalDateTime

我正在编写一个Android应用程序,它应该通过我在服务器端开发的HTTPRESTAPI接收一个java.time.LocalDateTime对象。问题是Android还在Java7中,java.time只在Java8中可用。话虽如此,在Android中表示包含日期和时间的变量的最佳方式是什么?我不想使用sql.timestamp。谢谢! 最佳答案 后端口您可以使用ThreeTenAndroidBackport这是对原始ThreeTen-Backport的Android改编将许多新的java.timeapi反向移植回JavaSE6和

android - 统一: Call android function from Unity

AndroidJavaClassunityPlayer=newAndroidJavaClass("com.unity3d.player.UnityPlayer");AndroidJavaObjectactivity=unityPlayer.GetStatic("currentActivity");activity.CallStatic("testMethod");这就是我不带参数调用Android静态函数的方式,它的工作非常完美。但是当我尝试使用参数调用非静态函数时遇到问题。我试着这样调用它:activity.Call("testMethod","testString");但是Andr

android - Ionic 2 - 错误:net::ERR_CONNECTION_TIMED_OUT 在 android 设备上运行时

(抱歉我的英语不好)我已经使用Ionic2forAndroid构建了一个应用程序。在此应用程序中,我需要从API获取信息,当我在浏览器中运行它时,它工作得很好(ionicserve)。问题是当我在我的设备(Android6.0.1)上运行时我遇到了这个问题:net::ERR_CONNECTION_TIMED_OUT然后我搜索了如何解决这个问题,并尝试了很多方法。我有cordova-plugin-whitelist,我的config.xml看起来像:我把它放在我的index.html中:我已经阅读了很多关于这个问题的文档,但我没有发现任何真正有用的东西。有人可以帮帮我吗?谢谢

android - 将 String 格式的 Facebook JSON created_time 转换为 long 格式

我正在开发android应用程序并尝试从facebookJSON获取created_time。我在这方面取得了成功,并且得到了2011-07-14T12:28:52+0000。现在应该将其转换为长格式,如220200202932093我现在的挑战是将其转换为长格式。这是因为我计划在android中使用getRelativeTimeSpanString获取相对时间。请帮我将字符串格式的时间从JSON对象转换为长格式 最佳答案 StringexampleDateString="2011-07-14T12:28:52+0000";try{

android工作室错误错误:Connection timed out

我只是在androidstudio中新建了一个项目,并向其中添加了gcm模块。我一直给出这个错误信息Error:Connectiontimedout:connect.IfyouarebehindanHTTPproxy,pleaseconfiguretheproxysettingseitherinIDEorGradle.而且我不使用任何代理。谁能帮我解决这个问题?更新现在重建我的项目后我给出了这个错误Error:Aproblemoccurredconfiguringproject':app'.Aproblemoccurredconfiguringproject':backend'.Cou

android - 尝试在 android 设备上调试我的应用程序时获取 "Launch error: Failed to connect to remote VM. Connection timed out"

我尝试了网上和本网站提供的所有可能选项,但没有一个有效。我得到:Launcherror:FailedtoconnecttoremoteVM.Connectiontimedout.当我尝试在我的移动设备上调试我的应用程序时。当我正常运行时,应用程序运行正常,没有任何问题我现在至少使用过这些链接:Howtoresolve"WaitingforDebugger"message?Eclipseissue-Launcherror:FailedtoconnecttoremoteVM.ConnectiontimedoutEclipseError:"FailedtoconnecttoremoteVM"

android - 无法扩展 ListFragment - "Call requires API level 11"

我正在尝试扩展ListFragment,但我不断收到上述错误。我将android支持库添加到我的项目中。 最佳答案 您的项目/类可能有错误的导入。您可能从API11(android.app.ListFragment)扩展了ListFragment并且您应该从兼容类(android.support.v4.app.ListFragment)扩展ListFragment 关于android-无法扩展ListFragment-"CallrequiresAPIlevel11",我们在StackOv

java - HttpURLConnection 抛出 java.net.SocketTimeoutException : SSL handshake timed out in Android 4. 1.1

我的代码在Android5.0及更高版本中运行时运行良好。但在Android4.1.1中它抛出java.net.SocketTimeoutException:SSL握手超时。URLurl;HttpURLConnectionconnection=null;Stringcharset="UTF-8";StringaccessToken="";try{ArrayListpostParameters=newArrayList();postParameters.add(newBasicNameValuePair("client_id",CLIENT_ID));postParameters.add