草庐IT

request_uri

全部标签

android - 从通过 FileProvider 创建的 Uri 获取文件路径

我使用此方法从Urihttps://github.com/iPaulPro/aFileChooser/blob/master/aFileChooser/src/com/ipaulpro/afilechooser/utils/FileUtils.java#L257获取文件路径但是当我传递如下创建的Uri时它抛出异常(“_data”列未找到):publicstaticUriuriFromFile(Contextcontext,Stringpath){if(path==null)returnnull;returnFileProvider.getUriForFile(context,Build

android - Android Nougat 锁屏中 URI 的 startActivity

我正在使用从AlarmManager接收广播的BroadcastReceiver。在接收器中,我开始了两项Activity。一个Activity是从这样的URI开始的,并且是第三方应用程序://OpenspotifyIntentspotify=newIntent(Intent.ACTION_VIEW,Uri.parse(song));spotify.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);try{context.startActivity(spotify);}catch(ActivityNotFoundExceptione){status=Sta

支持 Postman 同步,IDEA 插件 Fast Request 2023.2.3 发布

简介RestfulFastRequest 是一个类似于Postman的IDEA插件。它是一个强大的restfulapi工具包插件,可以根据已有的方法帮助您快速、自动生成url和params。RestfulFastRequest=API调试工具+API管理工具+API搜索工具。它有一个漂亮的界面来完成请求、检查服务器响应、存储你的api请求和导出api请求。插件帮助你在IDEA界面内更快更高效得调试你的API。最新域名:api-buddy.cnRestfulFastRequest为简化API调试而生,3秒调完Spring接口不是梦,所以少年,赶紧上号吧RestfulFastRequest为简化A

android - 如何裁剪 Android 中已知 URI 的图像?

我希望在imageview中显示的图像选择特定部分(并且只有选定部分需要突出显示,其他部分半透明)并且该部分也可以根据需要调整大小或由用户在触摸事件中完成。现在,需要裁剪图像的选定部分,然后显示并保存裁剪后的图像。编辑:我使用Intent打开图像并使用intent.putExtra("crop","true");对其进行裁剪但是在传递Intent时,我想打开URI已知的图片,而不是打开图片库的整个相册。任何人都可以建议,我如何通过打开图像的Intent传递来打开特定的URI。提前致谢。 最佳答案 关于问题的最后一部分,如果您使用的是

Warning: Could not create server TCP listening socket Cannot assign request

一、问题:docker部署redis时发现dockerps命令查看redis端口号为空 二、原因:在网上查找基本都是6379端口被占用三、解决方法1、先dockerstop停掉redis容器2、通过修改redis挂载在linux上的redis.conf文件,将bind127.0.0.1ip地址放开,之前注释掉了。bind127.0.0.1这个是绑定了我们的主机地址,意思是只允许我们主机访问redis。如果需要远程访问redis,那么这句话应该注销掉。3、重启redis即可: dockerrun--restart=always--log-optmax-size=100m--log-optmax-

android - 更改 MediaPlayer URI

我有以下工作代码:@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);this.setContentView(R.layout.player);videoView=(VideoView)this.findViewById(R.id.videoView);playVideo();//videofinishlistenervideoView.setOnCompletionListener(newMediaPlayer.OnCompletionListener(

android - Intent : URI not working in Android browser

所以我点击这个链接:Google(我知道这是一个愚蠢的例子,因为它可能只是http://www.google.com,但它说明了问题)我从中确定了这个URILog.v(newIntent(Intent.ACTION_VIEW).setData(Uri.parse("http://www.google.com")).toUri(Intent.URI_INTENT_SCHEME));我在logcat中看到以下内容:08-0208:32:34.708I/ActivityManager(71):Startingactivity:Intent{act=android.intent.action.

android - 从 Android Lollipop 中的 Uri 裁剪照片后总是返回 Null?

我尝试在拍照或选择图片后从Uri裁剪图像。我的代码是这样的:publicstaticvoidcropImage(Uriuri,Activityactivity,intaction_code){Intentintent=newIntent("com.android.camera.action.CROP");intent.setDataAndType(uri,"image/*");intent.putExtra("crop","true");intent.putExtra("aspectX",1);intent.putExtra("aspectY",1);intent.putExtra("

java - 如何获取使用 FileOutputStream 保存的文件的 URI?

这是将图像文件保存到...某处的代码?如何获取文件“webimage”的URI?Bitmapbmp=((BitmapDrawable)imageView.getDrawable()).getBitmap();StringfileName="webImage";//no.pngor.jpgneededtry{ByteArrayOutputStreambytes=newByteArrayOutputStream();bmp.compress(Bitmap.CompressFormat.JPEG,100,bytes);FileOutputStreamfo=openFileOutput(fil

android - 无法在 android 中导入 Session、Request、Response、GraphUser 包

我在我的ecllipe中导入了最新的facebooksdk。当我试图在我的应用程序中获取基本信息时,它不会导入请求、响应和session的相应包。我要做什么?导入相应的包。我尝试了以下代码,但在导入相应包时遇到问题。登录Activity.java@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_main);if(Session.getActiveSession()==null||Sessi