草庐IT

recognizer-intent

全部标签

android - 使用 Intent 将数据发送到我的 Activity

我有一个正在运行的服务器通过打开我的主要Activity的状态栏通知来通知用户,我如何通过该Intent将数据传递到我的Activity? 最佳答案 主要ActivityIntentintent=newIntent(MainActivity.this,SecondActivity.class);intent.putExtra("extra_text",string);startActivity(intent);第二个ActivityStringtext=getIntent().getStringExtra("extra_text")

android - 我是否从亚马逊应用商店获得 INSTALL_REFERRER Intent ?

我找不到任何文档提及Amazon应用商店是否像GooglePlay那样在安装后发送引荐Intent。尽管Amazon的文档确实说我们可以在“ref”下的URL中设置引荐来源信息(与GooglePlay中的“引荐来源”相比),但它没有明确说明如何将这些信息传递给应用程序。如果我确实收到了Intent,我应该怎么做extras.getString("ref")代替extras.getString("referrer")? 最佳答案 我有同样的问题,我通过邮件询问亚马逊,这是他的反馈:Unfortunatelywedonothavethi

android - 在 Android 中,如果操作系统终止了我的应用程序,getIntent() 会返回具有相同附加功能的 Intent 吗?

当然是在我的应用程序恢复之后。或者我必须将所有内容存储在onSaveInstanceState()中? 最佳答案 这个对话似乎回答了它:http://groups.google.com/group/android-developers/browse_thread/thread/f47af26b696af2e2.查找以“是和否”开头的帖子以及之前的几个帖子。答案是肯定的:是的,在操作系统关闭的Activity重新启动后,getIntent()将返回一个与原始Intent具有相同额外功能的Intent。不过,如果有Android专家可以

android - 如何使用 Intent 限制录音时间?

使用Intent时如何限制录音?我试过这段代码:Intentintent=newIntent(MediaStore.ACTION_VIDEO_CAPTURE);intent.putExtra("android.intent.extra.durationLimit",5);startActivityForResult(intent,RQS_RECORDING);当我录制视频时,这段代码工作正常。时间从5到0倒计时,5秒后录音自动停止。但是当我录制声音时,这个有限的时间不起作用。为什么?Intentintent=newIntent(MediaStore.Audio.Media.RECORD

android - Google Analytics 服务 Intent 在 Android Oreo 上崩溃

我已经升级我的应用程序以支持SDK26,现在GoogleAnalytics在AndroidOreo上运行时会导致崩溃:FatalException:java.lang.RuntimeException:Unabletostartreceivercom.google.android.gms.analytics.AnalyticsReceiver:java.lang.IllegalStateException:NotallowedtostartserviceIntent{act=com.google.android.gms.analytics.ANALYTICS_DISPATCHcmp=c

c++ - gdb 错误不是可执行格式 : File format not recognized

我正在尝试在Ubuntu16.04上调试一个简单的“helloworld”C++程序,但gdb无法识别可执行文件格式。但是,我能够在命令行上成功运行可执行文件。这是代码#includeusingnamespacestd;intmain(){cout我使用命令编译程序文件TestProject.cppg++-gTestProject.cpp-ohello然后要调试,我给出命令gdb./hello我收到以下错误信息GNUgdb(Ubuntu7.11.1-0ubuntu1~16.5)7.11.1Copyright(C)2016FreeSoftwareFoundation,Inc.Licens

android - 使用 Binder 从 native cpp 应用程序中 bundle Intent

我正在尝试从nativecpp代码调用Intent。基本上,据我所知,我必须编写一个Parcel来匹配来自frameworks/base/core/java/android/app/ActivityManagerNative.java的确切反序列化序列;案例BROADCAST_INTENT_TRANSACTION。到目前为止的进展是,我已经在J​​ava应用程序中收到了Intent,但我在bundle负载方面遇到了一些问题。我已经调试了Java应用程序,它似乎将垃圾读取为int,而不是读取保存包键类型的int。W/System.err(1386):java.lang.RuntimeEx

windows - psql "more is not recognized"错误

我在Windows8.1(64位)上使用postgresql(9.4)交互式终端psql。安装和创建数据库和表并将数据插入行后,我想查看数据。但是,当我输入SELECT*FROMmy_table;我得到一个错误:'more'isnotrecognizedasaninternalorexternalcommand,operableprogramorbatchfile.添加“C:\Windows\System32;”后对于我的路径变量,更多在Powershell中有效(例如更多hello.txt)但在psql中仍然无效。我还需要做什么才能使SELECT语句起作用?

ruby-on-rails - Windows : 'script' is not recognized as an internal or external command 上的脚本/生成

每当我尝试使用Railsscript/generate或script/install命令时,我都会遇到这种错误:C:\workspace>script/generatebigcommand'script'isnotrecognizedasaninternalorexternalcommand,operableprogramorbatchfile.知道为什么吗? 最佳答案 在Windows上,您可能需要像这样调用它:“rubyscript\generate...” 关于ruby-on-ra

php - 更改了 Windows PATH 但仍然收到 'php.exe is not recognized ' 错误消息

我将PATH环境变量更改为:c:\xampp\php\php.exezend框架路径:c:\xampp\php\ZendFramework-1.11.5我的include_path看起来像这样:include_path="C:\xampp\php\;C:\xampp\php\ZendFramework-1.11.5\library"然后我的Windows终端语句开始:C:\xampp\php\zendframework-1.11.5\bin\zf.batcreatenewprojectquikstart但我仍然不断收到提示中的错误"php.exe"isnotrecognizedasan