android-intent

Share intent issue in Instagram feed

早过忘川 提交于 2020-04-07 11:37:06
问题 I have an app that shares images from url. Last android update, I got message from instagram "Unable to load image" when I want to share an image in instagram feed. But i can share image story, direct message, and everywhere... I am having this issue only instagram feed. public void onShareItemOreo() { // Get access to bitmap image from view imageView = (ImageView) findViewById(R.id.thumbnail); // Get access to the URI for the bitmap Uri bmpUri = prepareShareIntent(imageView); if (bmpUri !=

Callback for Custom Item in Intent Chooser Screen

醉酒当歌 提交于 2020-04-07 05:43:39
问题 My use case is to download an image from a Custom Download option from Intent Chooser. I understand that I can add the custom option by adding some code like below : Intent share = new Intent(Intent.ACTION_SEND); share.setType("text/plain"); share.putExtra(Intent.EXTRA_TEXT, message); Intent addIntent = ;//whatever you want Intent chooser = new Intent(Intent.ACTION_CHOOSER); chooser.putExtra(Intent.EXTRA_INTENT, share ); chooser.putExtra(Intent.EXTRA_TITLE, "title"); Intent[] intentArray =

How to create the same Activity Multiple times to have an effect like Google Chrome Tabs?

泄露秘密 提交于 2020-03-27 02:49:43
问题 I am creating a browser for Android and I want to duplicate my Activity for create a new multitasking task with the same activity. Intent intent=new Intent(this, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK); startActivity(intent); This is my code, Please help. Thanks 回答1: Use this replace the flag new_task with new_document Intent intent=new Intent(this, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT | Intent

Killed app notification click intent putExtra method not working [closed]

青春壹個敷衍的年華 提交于 2020-03-23 23:56:57
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 months ago . I have a problem intent.putExtra is not working when the app is killed. Wake up and running mode all works. I use firebase messaging service, getData() method, pending intent. private PendingIntent getPendingIntent(int newsID) { Intent intent = new Intent(this, DetailedNewsActivity.class); intent

Killed app notification click intent putExtra method not working [closed]

不问归期 提交于 2020-03-23 23:56:26
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 months ago . I have a problem intent.putExtra is not working when the app is killed. Wake up and running mode all works. I use firebase messaging service, getData() method, pending intent. private PendingIntent getPendingIntent(int newsID) { Intent intent = new Intent(this, DetailedNewsActivity.class); intent

send data from activity to another without start it

孤者浪人 提交于 2020-03-21 11:30:31
问题 If I have two activities Activity1 and Activity2 and I want to send data from Activity1 to Activity2 without Start Activity2 I know if I want to start Activity2 I use this code in Activity1.java Intent intent ; Bundle bundle = new Bundle(); bundle.putString(BG_SELECT, hexColor); intent = new Intent(getApplicationContext(), Activity2.class); intent.putExtras(bundle); // this is to start but I want just refresh Activity2 not start it startActivityForResult(intent, uniqueNo); and in Activity2

Intent to start activity - but don't bring to front

╄→гoц情女王★ 提交于 2020-03-17 06:44:04
问题 Description: Activity A is visible (or in the background) Intent I is received by a broadcast with valuable extras and then passes the extras to a new Intent I2 that will be used to start activity A . Outcome: Do not bring activity to front if activity is in background. Code: Intent I2= new Intent(context, MyActivity.class); I2.putExtra(.. I2.setFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK); // | Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(I2); Note: I added no "android:taskAffinity" to

Issue with intent filter for opening a file in Android app

*爱你&永不变心* 提交于 2020-03-12 05:08:28
问题 I'm trying to open any file with a .conf extension in my android app. Here's what I have in my AndroidManifest.xml : <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="file" /> <data android:host="*" /> <data android:mimeType="*/*" /> <data android:pathPattern=".*\\.conf" /> </intent-filter> <intent-filter> <action android:name=

startActivityForResult(…) immediately returns 0

最后都变了- 提交于 2020-03-06 09:10:22
问题 When I call startActivityForResult(new Intent(getActivity(), VkAuth.class), VK_ID); on Samsung (on HTC and Nexus everything works fine), onActivityResult with requestCode == VK_ID and result code 0 (Cancelled) is called before the VkAuth Activity is created. The parent Activity has android:launchMode="singleInstance" . startActivityForResult is called from a Fragment attached to the parent Activity. Log E/AuthenticationFragment: vkLogIn E/AuthenticationFragment: startActivityForResult 9101 E

How to apply changes to widget when placing it on the homescreen in onEnabled?

怎甘沉沦 提交于 2020-03-06 02:31:32
问题 When I try to put my weather widget on the homescreen I want to give the user an option of choosing a city at that moment and the widget starts showing the weather for that city. For this I have made use of onEnabled method in Provider class. So what I am doing here is just starting an activity to some preference class where I make use of string array to give the user the option to choose. And then OnSharedPreferenceChangeListener inside onEnabled again I am starting another activity with the