草庐IT

ACTION_INTENT

全部标签

android - 从 Fragment 到 Activity 的 Intent

我试图使用button转到另一个页面,但总是失败。这是我的第一个类及其XML:publicclassFindPeopleFragmentextendsFragment{publicFindPeopleFragment(){}@OverridepublicViewonCreateView(LayoutInflaterinflater,ViewGroupcontainer,BundlesavedInstanceState){ViewrootView=inflater.inflate(R.layout.fragment_home,container,false);returnrootView

android - android如何比较挂起的 Intent

PendingIntent.FLAG_NO_CREATE的文档阅读:FlagindicatingthatifthedescribedPendingIntentdoesnotalreadyexist,thensimplyreturnnullinsteadofcreatingit.我的问题:使用什么标准来比较PendingIntents?我猜这个标志使用了PendingIntent.equals,但我不确定该函数使用的是什么标准。是在使用action、requestCode、category、extras(我猜不是)等吗?上下文:如果我的闹钟尚未设置,我想启动一个带有待处理Intent的闹

android - android如何比较挂起的 Intent

PendingIntent.FLAG_NO_CREATE的文档阅读:FlagindicatingthatifthedescribedPendingIntentdoesnotalreadyexist,thensimplyreturnnullinsteadofcreatingit.我的问题:使用什么标准来比较PendingIntents?我猜这个标志使用了PendingIntent.equals,但我不确定该函数使用的是什么标准。是在使用action、requestCode、category、extras(我猜不是)等吗?上下文:如果我的闹钟尚未设置,我想启动一个带有待处理Intent的闹

用于捕获图像和视频的 Android Intent ?

是否有启动相机的Intent选项,可以在Android上同时捕捉图片和视频?我已使用MediaStore.ACTION_VIDEO_CAPTURE和MediaStore.ACTION_IMAGE_CAPTURE来捕获音频或视频,但我找不到可以在两者之间切换的Intent,如本示例应用程序所示:谢谢! 最佳答案 不可能使用相同的Intent同时捕获图像和视频,您的选择是1)创建您自己的相机thisrepocanbeagoodstart但这将是一个太多的努力。2)使用选择器Intent并传递图像和视频的Intent,这将使您可以选择分别

用于捕获图像和视频的 Android Intent ?

是否有启动相机的Intent选项,可以在Android上同时捕捉图片和视频?我已使用MediaStore.ACTION_VIDEO_CAPTURE和MediaStore.ACTION_IMAGE_CAPTURE来捕获音频或视频,但我找不到可以在两者之间切换的Intent,如本示例应用程序所示:谢谢! 最佳答案 不可能使用相同的Intent同时捕获图像和视频,您的选择是1)创建您自己的相机thisrepocanbeagoodstart但这将是一个太多的努力。2)使用选择器Intent并传递图像和视频的Intent,这将使您可以选择分别

安卓 : restart application after update - ACTION_PACKAGE_REPLACED

我的应用程序不在Play商店中,请在网络上验证是否有新版本并下载并启动它。安装后我想重新启动应用程序,并使用BroadcastRecevier和ACTION_PACKAGE_REPLACED。这是代码:广播:publicvoidonReceive(Contextcontext,Intentintent){if(intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED)){ApplicationInfoapp=newApplicationInfo();if(app.packageName.equals("it.android.dow

安卓 : restart application after update - ACTION_PACKAGE_REPLACED

我的应用程序不在Play商店中,请在网络上验证是否有新版本并下载并启动它。安装后我想重新启动应用程序,并使用BroadcastRecevier和ACTION_PACKAGE_REPLACED。这是代码:广播:publicvoidonReceive(Contextcontext,Intentintent){if(intent.getAction().equals(Intent.ACTION_PACKAGE_REPLACED)){ApplicationInfoapp=newApplicationInfo();if(app.packageName.equals("it.android.dow

android - 如何将 Action Bar Sherlock 导入到 gradle 项目?

我已使用发布此问题的步骤将模块导入AndroidStudio:ProblemsimportingprojectintoAndroidStudioregardingActionBarSherlockIDE运行良好,但不影响构建。来自AndroidStudio:AreLibraryProjectdependenciespickedfromproject.properties?IfyouuseGradle,project.propertiesiscompletelyignored.YoushouldnotusetheModuleSettingstoadddependenciesnowasit

android - 如何将 Action Bar Sherlock 导入到 gradle 项目?

我已使用发布此问题的步骤将模块导入AndroidStudio:ProblemsimportingprojectintoAndroidStudioregardingActionBarSherlockIDE运行良好,但不影响构建。来自AndroidStudio:AreLibraryProjectdependenciespickedfromproject.properties?IfyouuseGradle,project.propertiesiscompletelyignored.YoushouldnotusetheModuleSettingstoadddependenciesnowasit

android - 如何强制共享 Intent 打开特定应用程序?

我喜欢分享Intent,非常适合打开带有图像和文本参数的分享应用。但现在我正在研究强制共享Intent从列表中打开特定应用程序的方法,并为共享Intent提供参数。这是我的实际代码,它显示了手机上安装的共享应用程序列表。拜托,有人能告诉我我应该在代码中添加什么来强制例如官方推特应用程序吗?和官方faccebok应用?IntentsharingIntent=newIntent(Intent.ACTION_SEND);UriscreenshotUri=Uri.parse("file:///sdcard/test.jpg");sharingIntent.setType("image/*");