草庐IT

Action_Send_Multiple

全部标签

android - 如何使用 ACTION_PACKAGE_FIRST_LAUNCH intent-filter 启动应用程序?

我正在尝试使用intent-filterACTION_PACKAGE_FIRST_LAUNCH让应用程序在首次启动时执行一些任务,但是它没有被广播接收器捕获我的list这是我的广播接收器实现this.context=context;StringmAction=intent.getAction();Log.i("r",mAction);if(mAction==Intent.ACTION_PACKAGE_DATA_CLEARED){}elseif(mAction==Intent.ACTION_PACKAGE_FIRST_LAUNCH){}如何让它在应用首次启动时启动?

android - 使用 Intent.ACTION_PICK 打开图像

我正在尝试使用intent.ACTION_PICK打开图像,但是当我使用startActivityForResoult启动Activity时,我的应用程序崩溃了。我做错了什么的任何线索?publicvoidbutton_load_image(Viewview){Stringpath=Environment.getExternalStorageDirectory().getAbsolutePath()+"/"+SimpleCamera.getAlbumName();Filef=newFile(path);if(f.exists()){Log.d("button_load_image","

安卓 : Unable to display multiple lines of text in Notification

我试图在通知中使用BigTextStyle显示多行文本,但无法这样做。我正在使用下面的代码。publicvoidsendNotification(Viewview){StringmsgText="JeallyBeanNotificationexample!!"+"whereyouwillseethreedifferentkindofnotification."+"youcanevenputtheverylongstringhere.";NotificationManagernotificationManager=getNotificationManager();PendingInten

android - Material 设计 : how to set transparency for Android Floating Action Button

我的问题与this有关一。当我打开NavigationDrawer时,FloatingButton位于其顶部,但必须位于下方。我试着这样做:@OverridepublicvoidonDrawerSlide(ViewdrawerView,floatslideOffset){Log.i(TAG,"inneronDrawerSlide");super.onDrawerSlide(drawerView,slideOffset);fabButton.setAlpha(25);floatalpha=0.2f;AlphaAnimationalphaUp=newAlphaAnimation(alpha

Android ACTION_RECOGNIZE_SPEECH Intent 在长时间讲话后永远不会完成

我开始打算并等待结果。它在简短的演讲中效果很好,但如果演讲太长,它不会给我答案。(将近1分钟)finalIntentsearchIntent=newIntent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);searchIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE,"tr");searchIntent.putExtra(RecognizerIntent.EXTRA_PROMPT,true);searchIntent.putExtra(RecognizerIntent.EXTRA_ONLY_RETUR

android - Intent.ACTION_VIEW 视频网址不适用于 Ice Cream Sandwich

我有以下代码来查看远程托管的视频文件:startActivity(newIntent(Intent.ACTION_VIEW,Uri.parse(article.getLink())));其中getLink()返回与文章关联的视频的URL。此方法在Gingerbread之前的设备上运行良好,但我最近在ICS上测试该应用程序并发现了一个问题。ICS浏览器开始加载URL,我在导航栏中看到它,但浏览器几乎立即关闭,我又回到我的应用程序Activity中。当它发生时,我得到以下堆栈跟踪:11-2810:24:44.488:E/SurfaceTexture(116):[com.mypackage.

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

Android Wear - 从手持 Action 开始穿戴 Activity

我正在从Android手持设备向Android穿戴设备发送通知。我想在通知中包含一个Action,以在Android穿戴设备上启动一个Activity。如何将挂起的Intent设置为可穿戴设备上的Activity?如果通知是在可穿戴设备上创建的,我可以启动Activity,但如果通知是在手机上创建然后发送到可穿戴设备,我就不能启动该Activity。//creatingactionforpushnotificationcreatedonhandheldpublicNotificationCompat.ActionCreateWearAppAction(IntegermetricId){

android - Firebase 云消息传递设备 ID : multiple user in same app in same device

有没有一种方法可以创建具有登录用户范围的注册ID。我有一个允许用户以不同用户身份登录的应用程序(比如一个用户作为学生,另一个用户作为家长)。用户可以在用户之间切换。案例有点类似于gmailapp,可以同时登录多个emailid。问题是我们打电话的时候FirebaseInstanceId.getInstance().getToken()它将给出该应用程序实例的设备ID。因此,如果我要针对登录的特定用户,我不能。我可以实现定位用户的一种方法是将user_id作为数据显式发送,在我的情况下,这效率不高,因为它需要为每个用户发送一个FCM发送请求。无论如何这可以实现。想知道gmail如何处理用

android - TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA 的 IntentNotFoundException

我正在尝试通过关注thisarticle来实现文本到语音的转换在Android开发者博客上。如果不支持,它会建议使用以下代码来安装文本到语音数据。IntentinstallIntent=newIntent();installIntent.setAction(TextToSpeech.Engine.ACTION_INSTALL_TTS_DATA);startActivity(installIntent);这会抛出一个Exception:ActivityNotFoundException:NoactivityfoundtohandleIntent但是,我使用的代码是here确定实际支持的I