草庐IT

ACTION_FOUND

全部标签

android - 如何在 ACTION_SCREEN_OFF 时停止服务

我试图让我的数字时钟小部件的UpdateService在屏幕关闭时停止以节省电池电量,然后在屏幕激活时重新打开。我目前在AppWidgetProvider的onReceive()中有它,但我也在BroadcastReciever中尝试过。我当前的代码是:publicstaticbooleanwasScreenOn=true;publicvoidonReceive(Contextcontext,Intentintent){super.onReceive(context,intent);if(intent.getAction().equals(Intent.ACTION_SCREEN_OF

android - 隐藏在android中使用 Action View 打开的url

你好在我的android应用程序中,我想打开假设http://www.google.com使用Intent。但我想隐藏正在传递的链接。有什么方法可以在android中实现这一点。我正在使用下面的代码。startActivity(newIntent(Intent.ACTION_VIEW,Uri.parse("http://www.google.com")));请分享您的宝贵建议。提前致谢:) 最佳答案 您的Intent启动了一个新Activity,如果您的应用程序无法控制新Activity。根据用户设备上安装的应用程序,它甚至可能无法

android - 使用 Intent.ACTION_CALL 拨号停止在电话号码中的 #

我尝试调用电话号码03012345,1234,#31#,98765(带有FRITZ!Box的调用)“03012345”是FRITZ!Box的电话号码,“,”是拨号暂停,“#31#”是向被叫方显示我自己的电话号码的前缀,“98765”是被叫方的电话号码.Stringphonenumber="03012345,1234,#31#,98765";startActivity(newIntent(Intent.ACTION_CALL,Uri.parse("tel:"+phonenumber)));在我的智能手机上,一切正常,但一些用户向我报告说,他们的智能手机在第一个#后停止拨号。但是当他们从联

android - 通过 "android.intent.action.SEND" Intent 启动服务

我目前有一个具有以下intent-filter的Activity类:这会导致我的应用程序出现在图库的Share-Via菜单中。这一切都很好。现在,我实际上不需要让它成为一个Activity,因为它不需要用户交互。相反,我想把它做成一个服务,通过Gallery中的Share-Via菜单以同样的方式启动。所以我将intent-filter移到了“服务”标签内,例如:但是,现在我在Share-Via菜单中看不到该应用程序了!这是为什么?我需要更改什么才能在Share-Via菜单中列出服务? 最佳答案 这是因为当用户点击Share菜单项时,

安卓应用程序 :Error "Found text"

我一直在关注一本关于Android的书“BeginningAndroidApplication”。我一直在尝试找出一个在View中显示图像的应用程序。但不幸的是,由于以下错误,我无法运行该应用程序:[2012-04-2419:37:33-Gallery]F:\eclipseworkspace\Gallery\res\values\attrs.xml:2:error:Foundtext"[2012-04-2419:37:33-Gallery]​​​​"whereitemtagisexpected为方便起见,我在这里给出了代码。主.xml此应用程序需要另一个xml文件。它在

android - 在具有 MenuItem.SHOW_AS_ACTION_ALWAYS 的 ActionBarSherlock 中将 TextWatcher 添加到 EditText

我正在使用ActionBarSherlock,我想在其中使用MenuItem.SHOW_AS_ACTION_ALWAYS显示一个EditText。它占据条的整个宽度并根据需要显示。但是我在尝试向其添加TextWatcher时遇到了麻烦。因此基于此处接受的答案:http://goo.gl/ite6h我写:EditTextsearch;publicbooleanonCreateOptionsMenu(com.actionbarsherlock.view.Menumenu){menu.add(0,1,1,R.string.inlineSearch).setIcon(R.drawable.ac

Android 设备驱动程序 : not found?

关闭。这个问题是off-topic.它目前不接受答案。想改进这个问题吗?Updatethequestion所以它是on-topic用于堆栈溢出。关闭9年前。Improvethisquestion我遵循了指南here安装我的Android设备驱动程序(Windows7),这样我就可以在我的真实设备而不是模拟器上运行应用程序。当Windows无法找到您需要的驱动程序并安装它们时,应该怎么办(...\adt-bundle-windows-x86_64\sdk\extras\google\usb_driver)?我确实浏览了互联网,但我的制造商似乎是“地下”的,我找不到任何可信赖的链接。具体来

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

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

java - 安全异常 : No persistable permission grants found for uri from ACTION_IMAGE_CAPTURE

我的应用使用相机拍照并长期使用。Intentintent=newIntent(MediaStore.ACTION_IMAGE_CAPTURE);UriresultUri=null;resultUri=getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,newContentValues());imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT,resultUri);startActivityForResult(imageCaptureInten

解决 Could not write request: no suitable HttpMessageConverter found for request type [java.lang.Long]

项目场景:业务服务通过RestTemplate调用文件上传服务。(1.8Hoxton.SR122.2.9.RELEASE2.3.12.RELEASE)问题描述由于restTemplate中引入了FormHttpMessageConverter消息转换器,在调用过程中,无法解析java.lang.Long类型,报错:org.springframework.http.converter.HttpMessageNotWritableException:Couldnotwriterequest:nosuitableHttpMessageConverterfoundforrequesttype[java