草庐IT

CALL_PHONE

全部标签

android - Google Glass GDK 是否支持 Intent.ACTION_CALL?

我正在尝试让一个在GoogleGlass上运行的Android应用程序来调用电话。这是调用Intent的代码:Stringuri="tel:+44.....";Intentintent=newIntent(Intent.ACTION_CALL);intent.setData(Uri.parse(uri));startActivity(intent);这会引发以下异常。09-2621:57:05.880:E/AndroidRuntime(4995):FATALEXCEPTION:main09-2621:57:05.880:E/AndroidRuntime(4995):android.co

安卓 WebView : call activity methods form JavaScript interface

是否可以从WebView对象的JavaScript接口(interface)调用主要Activity的方法?或者从这个界面访问SharedPreferences以便我可以通过我的Activity读取数据?我想让我的Activity知道发生了特定的JavaScript操作。 最佳答案 是的,通过WebView.addJavascriptInterface()可以实现JavaScript和您的应用程序之间的双向通信。检查这个例子:http://android-developers.blogspot.com/2008/09/using-w

Android Intent ACTION_CALL 不打电话

在我的Android应用程序我想在用户单击按钮时自动调用电话。我已经使用下面的一组代码来实现这个功能Intentintent=newIntent(Intent.ACTION_CALL);intent.setData(Uri.parse("tel:911"));startActivity(intent);在我的AndroidManifest.xml我已经添加了这个也许可。但它只是用给定的911打开拨号盘不,而不是打电话。 最佳答案 至少在美国,911是一个紧急电话号码。CALL_PHONE不足以调用该号码。有一个单独的权限(CALL_

android - Facebook 广告错误 : You can't call show() for ad in state LOADING

我正在按照他们的官方documentation将Facebook广告整合到我的应用程序中.但是当我运行我的应用程序时,出现以下异常java.lang.IllegalStateException:Youcan'tcallshow()foradinstateLOADING.YoucanchangeIntegrationErrormodebysettingAdSettings.setIntegrationErrorMode()atcom.facebook.ads.internal.c.a.a(UnknownSource:122)atcom.facebook.ads.internal.c.f.

android - 改造 2.6.0 异常 : java. lang.IllegalArgumentException : Unable to create call adapter for kotlinx. coroutines.Deferred

我有一个使用Kotlin协程和Retrofit的项目。我有这些依赖项:implementation'com.squareup.retrofit2:retrofit:2.5.0'implementation'com.squareup.retrofit2:converter-gson:2.5.0'implementation'com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:0.9.2'今天我把项目中的Retrofit更新到了2.6.0。在https://github.com/JakeWharton/retrofit2

java - EasyMock "Unexpected method call"尽管有 expect 方法声明

我的EasyMock预期方法被认为是意外的,尽管我没有使用和严格模拟,并且该方法在被回复之前已经声明。在这行代码中测试失败:IntentbatteryIntent=context.getApplicationContext().registerReceiver(null,newIntentFilter(Intent.ACTION_BATTERY_CHANGED));测试:@BeforepublicvoidsetUp(){mocksControl=createControl();contextMock=mocksControl.createMock(Context.class);//(.

android - 三星 Galaxy S 未调用 NEW_OUTGOING_CALL

试图拦截拨出电话,并有一个在上运行良好的解决方案nexus1stockandroid2.2HTC渴望2.2Motodefy2.1但不是在运行2.1的三星GalaxyS上,有人看到了吗?更新:还添加了PROCESS_OUTGOING_CALLS。接收者:publicclassOutGoingCallDetectionextendsBroadcastReceiver{privatestaticfinalStringTAG="OutGoingCallDetection";@OverridepublicvoidonReceive(Contextcontext,Intentintent){Str

android - 为什么我得到 "call to OpenGL ES API with no current context"?

我是openGL和android开发的新手,所以如果我的问题很琐碎,请原谅我。我正在尝试构建一个简单的小应用程序,该应用程序在三个EditText中接受用户的输入,这些EditText表示要在GLSurfaceView中显示的RGB颜色的每个组件的0-100%值。要注意的是,我需要它来使用openGLES2.0,并且我需要使用统一值将数据传递到着色程序,这样一旦我让它工作,我就可以继续我真正想要完成的事情。运行我编写的内容后,我可以让GLSurfaceView正确显示第一个纯色,但是每当我更改任何值并调用重建着色程序中的统一插槽时,我都会在LogCat中收到此错误:错误/libEGL(

android - GLSurfaceView : Do I need to to call onPause/onResume?

我在RENDERMODE_WHEN_DIRTY中使用GLSurfaceView(sdk版本7)。文档说我需要调用onPause/onResume,但没有它它也能正常工作,所以我想知道。是必需的吗?如果我不这样做会发生什么? 最佳答案 GLSurfaceView的onPause的实现是这样的:/***Informtheviewthattheactivityispaused.Theownerofthisviewmust*callthismethodwhentheactivityispaused.Callingthismethodwill

android - 我是否需要 Android Developer Phone 才能为 Android 平台开发应用程序?

我正开始开发一些Android应用程序,想知道我是否应该获得AndroidDeveloperPhone.如果我得到一部普通的Android手机怎么办?AndroidDevPhone是否提供自定义Android构建以外的任何优势。另外,我还在某处读到DevPhone“不强制执行签名的系统镜像”,这是什么意思,这个限制是一个阻碍吗?感谢您花时间回答这个问题。 最佳答案 发件人:http://developer.android.com/guide/developing/device.html您可以使用任何Android设备作为运行、调试和