草庐IT

expiration_intent

全部标签

dart - 是否可以将 Flutter 应用注册为 Android Intent 过滤器并处理传入的 Intent?

可以使用Flutter应用中的Intent启动另一个Activity:https://github.com/flutter/flutter/blob/master/examples/widgets/launch_url.dartimport'package:flutter/widgets.dart';import'package:flutter/services.dart';voidmain(){runApp(newGestureDetector(onTap:(){Intentintent=newIntent()..action='android.intent.action.VIEW'

android - 如果没有按钮,Espresso 不会记录任何 Intent

我正在尝试编写一个测试来验证使用Espresso启动的Intent,问题是intended()没有记录任何Intent。我有这个测试@Testpublicvoidshoulddosomething(){startActivity();intended(hasComponent(hasClassName(TemplatePictureCaptureActivity.class.getName())));}在我的Activity中我有这段代码@OverridepublicvoidonCreate(BundlesavedInstanceState){super.onCreate(savedI

android - 如何强制停止正在进行的 Intent Service?

我有一个intent服务可以下载几千兆字节的视频。我有一个“停止”按钮,如果不小心点击了“开始”或其他按钮,可以停止下载。我知道这个问题已被问过几次,但对我来说没有有效的答案。我尝试调用stopService(),但没有用。这只是调用IntentService.OnDestroy()。我试图在onDestroy中调用stopSelf(),但也不起作用。我尝试使用类似标志的东西,但如果onHandleIntent已经在运行,则不会调用它,它会等到当前工作完成后再执行。即使这行得通,我也必须有类似巨大的if语句的东西,这很糟糕我唯一的选择真的是将其重写为常规服务吗?//回答publiccl

android - 单击电子邮件链接时未找到处理 Intent 操作的 Activity 。查看

我在最新的应用程序更新后遇到了这个新的崩溃异常。它似乎没有指向任何地方。谁能说出问题是什么?看起来可能是由于以下原因导致的电子邮件格式问题:dat=mailto:xxxx@xxxxxxxxx.xxx(有额外内容)....但我不确定电子邮件中是否有任何错误。android.content.ActivityNotFoundException:NoActivityfoundtohandleIntent{act=android.intent.action.VIEWdat=mailto:xxxx@xxxxxxxxx.xxx(hasextras)}atandroid.app.Instrumenta

通配符上的 Android 主机 Intent 过滤器

是否可以在android:host属性上使用通配符?类似于:android:host="*.site.com"android:pathPattern=".*"android:pathPrefix="/m/"android:scheme="http"/>甚至android:host="*.site.*"android:pathPattern=".*"android:pathPrefix="/m/"android:scheme="http"/> 最佳答案 是的。看完Androidcode的IntentFilter.AuthorityEn

android - 使用裁剪 Intent 获取 java.lang.SecurityException : Unable to find app for caller android. app.ApplicationThreadProxy@4266ae80

我正在使用cropintent来裁剪图像,大部分时间它运行良好,但有时会出现java.lang.SecurityException:Unabletofindappforcallerandroid.app.ApplicationThreadProxy@4266ae80我附加了logcat,08-0711:33:21.190:I/BugSenseHandler(3337):Registeringdefaultexceptionshandler08-0711:33:21.230:I/BugSenseHandler(3337):Flushing...08-0711:33:21.230:I/Bu

android - 如何使用 Intent Action_send 在 Twitter 上发帖?

我一直在努力将文本从我的应用程序发送到Twitter。下面的代码可以显示一个应用程序列表,例如蓝牙、Gmail、Facebook和Twitter,但是当我选择Twitter时,它并没有像我预期的那样预填充文本。我知道在Facebook上执行此操作存在问题,但我一定是做错了什么,它不能与Twitter一起使用。Intentintent=newIntent(Intent.ACTION_SEND);intent.setType("text/plain");intent.putExtra(Intent.EXTRA_TEXT,"ExampleText");startActivity(Intent

android - 相机 Intent/Activity - 避免保存到画廊

我正在使用CameraActivity来拍摄照片。我用MediaStore.EXTRA_OUTPUT额外参数调用它。图片已正确保存到提供的路径,也保存到图库文件夹,因此我可以在“图库”应用程序中查看图片-我可以避免这种情况吗?...Filefile=newFile(Environment.getExternalStorageDirectory(),"Test.jpg");iImageOutputUri=Uri.fromFile(file);//StartcameraintenttocaptureimageIntentintent=newIntent(MediaStore.ACTION_

android - Firebase Android 身份验证失败 : expired_token (Auth token is expired)

我在使用com.google.gms:google-services:3.0.0和com.google.firebase:firebase-auth:9.0.1。使用Firebase(Google或Facebook)进行身份验证1小时后,我收到以下错误:W/PersistentConnection:pc_0-身份验证失败:expired_token(身份验证token已过期)为什么Firebasetoken会在1小时后过期以及如何延长此过期时间?更新我仍然遇到这个问题,Firebasetoken在1小时后过期。现在我收到以下消息:W/PersistentConnection:pc_0-

android - 三星 S3 中 onActivityResult(int requestCode, int resultCode, Intent data) 中的相机 Intent 数据为空

问题:我在SamsungS3的onActivityResult(intrequestCode,intresultCode,Intentdata)中获取相机Intent的数据为空。但在其他一些设备上运行良好。我定制了我的代码来获取数据并在网络上搜索了这个问题,但没有找到有用的东西。代码:protectedvoidonActivityResult(intrequestCode,intresultCode,Intentdata){if(requestCode==TAKE_CAMERA&&data!=null&&data.getData()!=null)elseif(requestCode==