草庐IT

action_settings

全部标签

android - 在 ACTION_VIEW Intent 中查看图像?

我想在图像查看器Intent中显示我从下一个下载的png或jpg,但无法让它工作。Bitmapbmp=getImageBitmap(jpg);Stringpath=getFilesDir().getAbsolutePath()+"/test.png";Filefile=newFile(path);FileOutputStreamfos=newFileOutputStream(file);bmp.compress(CompressFormat.PNG,100,fos);fos.close();Intentintent=newIntent();intent.setAction(androi

android - react native : JAVA_HOME is not set and no 'java' command could be found in your PATH

我一步步跟着官方GettingStarted.我从一个干净的linux安装开始,并根据“使用native代码构建项目”选项卡安装了所需的一切。我还阅读了故障排除部分。我已经使用终端创建了项目。这是我运行react-nativerun-android时的错误:StartingJSserver...Buildingandinstallingtheapponthedevice(cdandroid&&./gradlewinstallDebug)...ERROR:JAVA_HOMEisnotsetandno'java'commandcouldbefoundinyourPATH.Pleaseset

Android:在 htc Hero 上选择 Gmail 应用程序时,带有 EXTRA_STREAM 的 Intent.ACTION_SEND 不会附加任何图像

在带有默认邮件应用程序的模拟器上一切正常。但是当我收到一封我的英雄使用Gmail应用程序发送的邮件时,我没有附件。hero上的默认邮件应用程序运行良好。如何使此代码与Hero上的Gmail应用程序一起使用?你可以看到下面的代码。privatevoidstartSendIntent(){Bitmapbitmap=Bitmap.createBitmap(editableImageView.getWidth(),editableImageView.getHeight(),Bitmap.Config.RGB_565);editableImageView.draw(newCanvas(bitma

android - Intent.ACTION_CALL问题(SecurityException)

我已经使用这个Intent拨了一个写在Intent的setdatafield中的no但是当我运行应用程序并单击我放置此Intent的调用按钮时,我在LogCat中收到此错误06-1414:08:10.137:ERROR/AndroidRuntime(2898):java.lang.SecurityException:PermissionDenial:startingIntent{act=android.intent.action.CALLdat=tel:2125551212cmp=com.android.phone/.OutgoingCallBroadcaster}fromProces

android - Android手机靠小 Action 计算位置,Kotlin模拟蝴蝶网

在Kotlin中,我正在开发一个程序,用户可以通过移动手机来控制虚拟蝴蝶网。位置信息被发送到MQTT代理,UI应用程序将获取数据。我的问题是准确显示位置。如果手机是捕手的网络部分,那么理想情况下,当您移动手机时,使用加速度计我应该知道您移动的方向,并可以发送该数据。理论好,实践难。为了减少代码,我只想知道手机向上移动了多少,意识到它最多会向上移动两三英尺,所以如果它移动六英寸,我想告诉UI它移动了六英寸。在开头部分,我正在尝试根据手机的方向进行调整。如何准确追踪位置信息?overridefunonSensorChanged(sensorEvent:SensorEvent?){valmy

twincat报错Setting TwinCat in Run Mode inside HyperV (virtual machine) is not possible

我在点击Activate使twincat运行在run模式是遇到这个报错,在搜索过程中大部分答案都说去Windows功能中关闭Hyper-V,但是我发现我的Hyper-V本来就是关闭的。随后我找到解决办法,以管理员方式打开powershell(在搜索中输入powershell,右键以管理员身份运行)。执行命令bcdeditTwinCAT/sethypervisorlaunchtypeoff

APP_ABI 的 Android NDK : what should I set in Application. mk?

我想知道应该将哪些架构放入我的Android游戏的Application.mk文件中。我想支持所有可以在GooglePlay和其他类型的Android商店上下载游戏的平台。我会说我应该设置:APP_ABI:=armeabix86(asmanyx86devicesarecomingsoonasfarasIknow)但不知是否应该设置:APP_ABI:=armeabiarmeabi-v7ax86或APP_ABI:=all请澄清。 最佳答案 您还可以指定mips,当您使用all时将包括在内。armeabi代码可以在armeabi-v7a设

安卓初学者 : understanding MotionEvent actions

我无法让我的Activity生成MotionEvent.ACTION_UP。可能是初学者的错误。在LogCat中,我只看到ACTION_MOVE事件(它是一个值为3的整数)。我还看到了X/Y坐标。没有ACTION_DOWN也没有ACTION_UP。我到处寻找解决方案。我在论坛上发现了一个问题,好像和我的问题一样,但是没有提出解决方案:http://groups.google.com/group/android-developers/browse_thread/thread/9a9c23e40f02c134/bf12b89561f204ad?lnk=gst&q=ACTION_UP#bf1

android - set_metadata_recursive 在 Android 安装上失败

我正在尝试为我的droidrazrHD构建4.4android版本。它编译得很干净,但是当我尝试安装时它失败了,恢复日志中出现以下错误:ApplyParsedPerms:removexattrof/system/xbin/zipalignto0failed:Operationnotsupportedontransportendpointscriptaborted:set_metadata_recursive:somechangesfailedset_metadata_recursive:somechangesfailedE:Errorexecutingupdaterbinaryinzi

android - 约束布局布局崩溃 : All Children of constraint layout should have ids to use constraint set

更新到com.android.support.constraint:constraint-layout:1.1.0之后约束布局崩溃说:Allchildrenofconstraintlayoutshouldhaveidstouseconstraintset我已经为所有View设置了id,即使它崩溃了。java.lang.RuntimeException:AllchildrenofConstraintLayoutmusthaveidstouseConstraintSetatandroid.support.constraint.ConstraintSet.clone(ConstraintSe