草庐IT

EXTRA_OUTPUT

全部标签

android - Android 中的 File.toURI 和 Uri.fromFile 有什么区别

在尝试使用documentation中描述的相机Intent获取图片时.我已经添加了所需的MediaStore.EXTRA_OUTPUTextra,但问题是它没有将文件保存在我想要的位置。所以我更仔细地阅读了文档,并将其与我所做的进行了比较(因为我没有盲目复制/粘贴提供的示例代码),发现我正在使用intent.putExtra(MediaStore.EXTRA_OUTPUT,myFile.toURI());代替intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(myFile));第二个版本运行完美,但我不明白为什么。这两种方法的文档

android - 将 MediaStore.EXTRA_OUTPUT 用于 ACTION_IMAGE_CAPTURE 时对 onActivityResult 的 Intent 为空

我正在尝试从我的ACTION_IMAGE_CAPTUREActivity中检索文件,但是当我使用cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,MediaStore.Images.Media.EXTERNAL_CONTENT_URI);我的Activity结果为空Intent。这是完整的代码。IntentIntentcameraIntent=newIntent(MediaStore.ACTION_IMAGE_CAPTURE);cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT,MediaStore.Im

TypeError:__init __()缺少1所需的位置参数:'output_size'

嗨,我面临以下错误。请让我知道该怎么做。我面临与论点有关的错误model.add(TimeDistributedDense(self.output_size))from__future__importprint_functionfromkeras.preprocessingimportsequencefromkeras.modelsimportSequentialfromkeras.layers.coreimportActivation,RepeatVector,TimeDistributedDense,Dropout,Densefromkeras.layersimportrecurrentf

java - 使用 ACTION_IMAGE_CAPTURE 时返回什么数据?

我对这个描述有点困惑:ThecallermaypassanextraEXTRA_OUTPUTtocontrolwherethisimagewillbewritten.IftheEXTRA_OUTPUTisnotpresent,thenasmallsizedimageisreturnedasaBitmapobjectintheextrafield.Thisisusefulforapplicationsthatonlyneedasmallimage.IftheEXTRA_OUTPUTispresent,thenthefull-sizedimagewillbewrittentotheUriv

android - 从服务启动的 Activity 丢失了包中的 "extra"

调用代码(在服务中运行):IntenttextIntent=newIntent(this,TextActivity.class);textIntent.putExtra("text_seq",message.xfer.seq);textIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);startActivity(textIntent);调用代码(在TextActivity中):@OverrideprotectedvoidonCreate(Bundlebundle){super.onCreate(bundle);Log.d(TAG,""+bun

android - HttpURLConnection 后 : Output stream has no effect?

我正在开发一个Android应用程序,并且已经发现不同的Android版本在处理Http(s)URLConnections方面有不同的方式(http://stackoverflow.com/q/9556316/151682)。我遇到了Android4很好地通过HTTPS执行POST请求的问题,在运行下面的代码时自动添加像Content-Type这样的header。但是,在Android2.3.5(设备和模拟器)上,任何对输出流的写入似乎都被忽略了——我使用网络代理Charles对其进行了调试,当所有header都已发送时,写入输出流的数据是没有一起发送...有人知道怎么解决吗?注意:由

android - 如何在 Android 的 Chrome 自定义标签中将 EXTRA_REFERRER 添加到 CustomTabsIntent 构建器

我正在使用新推出的适用于Android的Chrome自定义选项卡,而不是使用WebView。Thisisthelinktotheirdocumentation下面是展示如何使用它的代码。Stringurl=¨https://paul.kinlan.me/¨;CustomTabsIntent.Builderbuilder=newCustomTabsIntent.Builder();CustomTabsIntentcustomTabsIntent=builder.build();customTabsIntent.launchUrl(this,Uri.parse(url));问题是我想为此添

mysql执行计划之Extra列-Using where

顾名思义,Extra列是用来说明一些额外信息的,我们可以通过这些额外信息来更准确的理解MySQL到底将如何执行给定的查询语句。MySQL提供的额外信息很多。这里单说Usingwhere。Usingwhere只是表示MySQL使用where子句中的条件对记录进行了过滤。与是否全表扫描或读取了索引文件没有关系,网上有不少文章把Usingwhere与是否读取索引进行关联,是不正确的,也有文章把Usingwhere与回表进行了关联,这也是不对的。 下面两个sql。其中第一个,表示用wherenameisnotnull条件后,拿到了enterprise表全量的90%的数据。 

java - 发送带有 POJO 的 android Intent 作为 Intent extra?

他们是将POJO放入intent.putExtra的方法吗?我查看了API,它似乎只支持字符串、整数、double、boolean值等类型,但不支持实际的POJO/常规Java对象。 最佳答案 您可以使用POJO,只要它实现了Serializable或Parcelable。看看intent.putExtra(String,Serializable)或intent.putExtra(String,Parcelable)。 关于java-发送带有POJO的androidIntent作为Int

java - 带有 EXTRA_OUTPUT 的 Android Intent MediaStore.ACTION_VIDEO_CAPTURE 在播放时崩溃,重拍

我正在尝试制作一个录制视频并将其保存到SD卡的应用程序,当它再次运行时它会覆盖之前的视频。问题是,当我指定额外的IntentEXTRA_OUTPUT时,摄像头将视频录制到该位置,但在重拍和播放点击时崩溃。我使用的代码如下:_path=Environment.getExternalStorageDirectory()+"/examplevideo.3gp";Filefile=newFile(_path);UrioutputFileUri=Uri.fromFile(file);Intentintent=newIntent(android.provider.MediaStore.ACTION