android-intent

Obtaining QR scan results via ZXing that is integrated into your app

老子叫甜甜 提交于 2020-01-01 19:15:04
问题 I used this answer to create a standalone Android library project that has the ZXing source code in it (ZXing v2.1). It compiles fine and if I run CaptureActivity, I can read a QR code as expected. I have another Android project from which I want to pull in this library. I have set that library relationship up correctly. The issue I am having is, how do I launch my local copy of the ZXing scanner via IntentIntegrator (mentioned here). I tried modifying the IntentIntegrator.initiateScan()

App already published onto Google Play but unable to use Google Voice Actions

只愿长相守 提交于 2020-01-01 17:25:30
问题 I am unable to successfully use the Google System Voice Actions "Search in App" ( com.google.android.gms.actions.SEARCH_ACTION ) on an app that I have already published onto Google Play (Private Channel) and downloaded onto my phone. The intent with the query extra from the search action is to be passed on to MainActivity after matching the intent filter. Before publishing the app, I have already tested the app using the adb command below which works perfectly: adb shell am start -a "com

Use Android Contacts app to edit a raw contact which was added by a custom ContentProvider

喜夏-厌秋 提交于 2020-01-01 16:59:17
问题 My app adds contact ' Bob ' to the address book using a custom ContentProvider . In the Android Contacts app, Bob shows up just as any other (Google) contact. But when I edit Bob in the Contacts app, the data provided by my application is not editable. So far so good. My question is : From within my app, is there a way to fire up the Contacts app, in a way that allows the user to edit the portion of Bob that belongs to my app? I have tried to use the corresponding Intent , as described in

Share Image Intent with custom Save To Gallery option

送分小仙女□ 提交于 2020-01-01 16:27:07
问题 I am using Android's default share intent to share an image to other apps. But I would like to add an option like Save to Gallery which saves that Image directly to Gallery in media or images or my app's folder. Currently I am using the simple code to share image: Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file)); shareIntent.setType("image/jpeg"); startActivity(Intent.createChooser(shareIntent, "Share

Android passing multiple numbers to SMS intent

99封情书 提交于 2020-01-01 16:11:51
问题 I am getting different numbers from Contacts and passing them to SMS application. I am using the following: Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( "sms:"+numbers) ); //numbers separated with ; intent.putExtra( "sms_body", body ); startActivity( intent ); The problem is if I separate numbers with ' ; ', it does not work on Galaxy S but works on others like HTC, Samsung Gio etc... On Galaxy S, it works if I separate numbers with comma ' , '. So how to resolve this issue? 回答1

Android passing multiple numbers to SMS intent

亡梦爱人 提交于 2020-01-01 16:11:11
问题 I am getting different numbers from Contacts and passing them to SMS application. I am using the following: Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse( "sms:"+numbers) ); //numbers separated with ; intent.putExtra( "sms_body", body ); startActivity( intent ); The problem is if I separate numbers with ' ; ', it does not work on Galaxy S but works on others like HTC, Samsung Gio etc... On Galaxy S, it works if I separate numbers with comma ' , '. So how to resolve this issue? 回答1

Is it good practice implementing Parcelable on a Room database entity?

半城伤御伤魂 提交于 2020-01-01 15:38:11
问题 I'm brushing on my Android dev skills and have been playing around with the Architecture Components. So I created an entity class using Room annotations for persistence to the database and implemented Parcelable on the entity class partly for the purpose of putting the entity object into an Intent object and passing it between activities/fragments. I just want to know if this is a good practice. Are there any cons of using such approaches such as database leaks or security flaws? Just curious

Is it good practice implementing Parcelable on a Room database entity?

不羁的心 提交于 2020-01-01 15:37:49
问题 I'm brushing on my Android dev skills and have been playing around with the Architecture Components. So I created an entity class using Room annotations for persistence to the database and implemented Parcelable on the entity class partly for the purpose of putting the entity object into an Intent object and passing it between activities/fragments. I just want to know if this is a good practice. Are there any cons of using such approaches such as database leaks or security flaws? Just curious

Starting service via “android.intent.action.SEND” intent

我怕爱的太早我们不能终老 提交于 2020-01-01 14:35:36
问题 I currently have an Activity class that has the following intent-filter: <intent-filter> <action android:name="android.intent.action.SEND"/> <category android:name="android.intent.category.LAUNCHER" /> <data android:mimeType="image/*"></data> </intent-filter> This causes my application to show up in the Share-Via menu from the Gallery. Which is all good. Now, I don't actually need want this to be an Activity, as it requires no user interaction. Instead, I want to make it into a service that

Starting service via “android.intent.action.SEND” intent

我们两清 提交于 2020-01-01 14:35:01
问题 I currently have an Activity class that has the following intent-filter: <intent-filter> <action android:name="android.intent.action.SEND"/> <category android:name="android.intent.category.LAUNCHER" /> <data android:mimeType="image/*"></data> </intent-filter> This causes my application to show up in the Share-Via menu from the Gallery. Which is all good. Now, I don't actually need want this to be an Activity, as it requires no user interaction. Instead, I want to make it into a service that