Questions tagged [android-intent]
Questions regarding practical and advanced use of Intents, Intent Extras and Pending Intents to start an Activity, Service or to respond to a system or application event/notification via a BroadcastReceiver. (refer to info for basic familiarity)
30,558
questions
0votes
0answers
8views
How to clear task with a different affinity?
I have an Activity A in my app which is launched as part of Chrome's task. This Activity opens Activity B which is part of an external library. Now, the problem is when the app is open with Splash ...
0votes
0answers
13views
Set flag to intent dynamically from response string
I have to start an intent with some flag values which will be received from an api response.
intent.addFlags(Intent.ANY_ACTION);
As shown in the above line, the value "ANY_ACTION" can be ...
1vote
0answers
12views
Android intent catch download CSV event from DEGIRO app
I'd like to open my app for downloading CSV created by another app (in my case is Banking DEGIRO app).
When I click on "CSV" icon CHROME, and Degiro itself, apps are offered for open the ...
0votes
1answer
18views
Passing List into ListView using Intent in Kotlin
I want to pass a List of string into another activity and then display it in a ListView using Intent. I fugured out that I have to pass the List as a Array or Serializable.
val intent: Intent = Intent(...
0votes
0answers
15views
how to get all value from broadcast intent one by one?
i am working on app in which i have to send multiple contact at a time
here is a sms code where i am sending different indices at time but at broadcast i am just getting update one for example , ...
0votes
0answers
29views
Android Firebase Onclick Intent how to get URL (on Recyclerview)
I'm having trouble to find how can i get URL from my firebase and when a user click on my image get to the url something like this OnClick -> Intent www.google.pt
I manage to do this without ...
0votes
0answers
7views
Launching activity from a singleinstance activity
I have 3 activities:
A, B , C
A has singleInstance launchMode.
A is the main activity, which launches B, B launches C, then I press the home button and open the app again.
A is opened, but when A ...
0votes
0answers
9views
Android - Link received in SMS (messages app) doesn't add the BROWSABLE category to Intent
I am adding the following intent to my main activity:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<...
0votes
0answers
18views
Android open up apps that use the camera permission?
I want to send the user away from my app to their camera app. The intention is that the user will be directed to open a camera app that allows for the scanning of QR codes.
What will work:
Attempt to ...
0votes
2answers
25views
How to set Intent in setOnClickListener in ViewPager2 in Android Studio?
@Override
public void onBindViewHolder(@NonNull ImageViewHolder holder, @SuppressLint("RecyclerView") int position) {
holder.imageView.setImageResource(imageList.get(position));
if(...
0votes
0answers
16views
How to open Google Play Store Install Page dialog like Youtube ads
I am looking forward to opening a Google play Store dialog as you see on YouTube when you click on any app install ads. I already tried the steps from this link to open the play store from my Android ...
1vote
0answers
15views
Does firebase count engagement time for android intent?
I have an AR app built in flutter and I am using github.com/drydart/model_viewer.dart to take care of the AR part.
The problem is that model_viewer displays AR using sceneviewer using android intent. ...
1vote
1answer
22views
Understanding Android Launch modes with splash screens
I have 3 activities: Splash (launcher), Login, Dashboard. When app is opened Splash waits some time and then starts Login, finishing itself. Then user can then navigate from Login to Dashboard.
I want ...
0votes
0answers
18views
How to add an image in in the ArrayList.add(new?
Please Could you help me?
I am creating a guess game in Android Studio with image and options answers. My question is How to add an image into Array list?
.
In the imageView I tried to add image but ...
2votes
0answers
10views
Is there any way to create a custom UI for android Settings.Panel.ACTION_WIFI
I was trying to use the wifi on/off option. I came through Settings.Panel.ACTION_WIFI and it is working as expected. However the system UI has issues in some of the devices. It is getting distorted in ...
1vote
2answers
28views
How to open both WhatsApp and GB-Whatsapp using an Intent in your Android App
I want to open chooser for both whatsapp and gb-whatsapp so the user can choose any of one from them. This code is only opening whatsapp only.
Intent intentWhatsapp = new Intent(Intent.ACTION_VIEW);
...
0votes
1answer
25views
Two instances of the same activity when receiving a new intent messing up the backstack
I'm developing an application where I need to use the OAuth flow of a certain API to receive the Authorization token which I exchange for an access token.
I am using the Navigation components ...
0votes
0answers
4views
Creating file and storing picture taken with and intent in this file
I am trying to create a file in a subdirectory of the internal storage and then saving a picture taken with a picture intent in this file. The picture is only supposed to be used once so everytime a ...
1vote
1answer
30views
Calling getStringExtra("key") on my Intent gives me null
This is so simple but still doesn't work.
I simply want to pass a string to the ACTION_PICK Intent to retrieve it in registerForActivityResult.
Here is my code:
class MainActivity : AppCompatActivity()...
0votes
0answers
6views
Dialogflow ES can not train any intent
I tried to create and train an intent for a dialogflow ES agent. It can only train one intent. For the second one, it always go to fallback intent even if ask a question from training phrase. I ...
0votes
2answers
30views
ListView being restored when returning to MainActivity - Android Java Activities
I'm building an app where I allow the user to make edits to the listview, fill it with content in a second activity, and send the results back to the first activity using intents, and display the ...
0votes
1answer
18views
How to pass List<object> to another activity in Xamarin.Android
I have List and I want to pass it to another activity
when I Serialize it using JsonConvert.serialize in the first activity and deserialize it on the other one, It works only when I am logging it to ...
0votes
0answers
20views
Android: Image resolution difference when sharing through Intent.EXTRA_STREAM
I have a menu option to share my app which generates an ArrayList of Uris object with a list of drawables Uris, and my issue is I've saved all the screenshots in 540x1170px and they get to email in ...
0votes
1answer
26views
Intent EditText values to another EditText values in Kotlin
does anyone know how to pass values editText from activity 1 to editText activity 2 using intent or bundle?
this is the first activity
this is the second activity
this is the code, the EditText values ...
0votes
0answers
11views
null pointer when the intent.getExtra after change fragment and go back to it agin from bottomnavigationview
I have and array list of custom objects and I pass it between the activities with no problem when I go to an activity that holds two fragments I got null pointer execption from courses = intent....
0votes
0answers
5views
Why do Activity intents may need setExtrasClassLoader but there is nothing similar for Fragment arguments?
I am having a problem with error: Class not found when unmarshalling: com.package.MyParcelableClass (which somehow only presents on release build)
I read about using setExtrasClassLoader to make it ...
0votes
0answers
20views
how to have which app the user used in a successful share intent?
I'm having problems with the sharing function of my app, in this case I have a share button that contains an introductory text and a deeplink for the user to share with other friends. However, for ...
0votes
0answers
31views
getIntExtra always gives default value?
Hi I'm fairly new to Java and Android Studio and am making a google map based app with user tracking. I've attempted to put my fake users locations into an Array which will then use intent.putExtra to ...
0votes
1answer
17views
How to invisible a Linier layout from other activity without using Intent?
Is it possible to invisible a Linier Layout from another activity without using Intent?
0votes
2answers
21views
How can I back to before 2 screen Android?
This is the scenario: I've got 3 pages; the first page A is the main page and uses splash, the second page is the B page, the third page is the C page. I want to navigate from C to A but I do not want ...
0votes
0answers
13views
Going back to activity does not work as expected
I have three activities:
MainActivity
OtherActivity
ThirdActivity // this becomes important later
Main navigates to Other via a respective Button.
It does so using the startActivity function like ...
0votes
0answers
23views
Can app support two intent activity simultaneously using coroutine scope
I have an app that accepts two intent requests (external intent request) with coroutine. For the main activity, I have written the code as below.
class MainActivity : Activity(), myClassInterface {
...
4votes
3answers
110views
+50
Android Studio - Unable to capture video from Camera
I am trying to capture video via Gallery or via Camera. I am able to successfully fetch the video from Gallery. However when I try to record the video from camera it loses the track and I am unable to ...
0votes
1answer
24views
How to open Google Map by clicking on a image Android Studio
I have a image (image of a map) in a activity and I want to open Google Map on the phone with certain geo coordinates. I have this following code that run fine and my application is lunching, but when ...
0votes
0answers
7views
nanoHttpD nano server handling two parallels request , each request needs to work independently
I have hosted my nano server in my local host and inside the serve method, I am performing external intent as below.
class MyServer(context2: Context) : NanoHTTPD(Companion.PORT) {
var ...
1vote
1answer
44views
Is it possible to put a button function inside switch intent?
In my first activity I have these codes which will allow me to go to the second activity.
btn1.setOnClickListener(v -> startActivity(new Intent(this,battle.class).putExtra("clicked",1)));
...
-1votes
1answer
22views
Creating multiple intent with specific extra, always read the same extra
I'm setting up an application with some notifications that are triggered by some Alarm. In order to set different notification, I take the current millis time as Id. However, when I'm passing it to ...
0votes
0answers
10views
startActivityForResult not working as i planned
hi guys im run into problem and it take 3 days and still nothing at all ;
first of all im very sorry for my poor english and apologies ;
my probelm is i can't reach the second else if in ...
0votes
1answer
41views
Starting an activity from an independent fragment
I am a beginner to Android development and I use kotlin. I followed a tutorial for splash and onboarding screens called "ViewPager2 with Navigation Component". Each screen is a fragment and ...
0votes
1answer
16views
Android 11<= resolveActivity
I work on improvement functionality for android app. There is a feature for making photo from app. And for andorid 11<=
takePictureIntent.resolveActivity(getPackageManager())
returns null. I know ...
-1votes
0answers
38views
Android ActivityResultLauncher no Intent call back
I want to install an app. Therefor I created an result launcher to listen for the intents callback:
var intentResultLauncher: ActivityResultLauncher<Intent> =
registry.register( "...
0votes
0answers
36views
Action: "android.settings.SECURITY_SETTINGS" throws ActivityNotFoundException on Samsung Android 12
I have an intent to open BiometricsAndSecuritySettingsActivity:
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(...
0votes
0answers
16views
Flutter Deep Link Unexcepted Behaviour
I am trying to implement deep links in my flutter app. When user clicked the link inside the Whatsapp app my app open inside the Whatsapp. I want to open my app separately.
In addition to this, when ...
0votes
1answer
31views
Android launching intent retrieved by webview (convert string to intent)
I am building an in-app browser for handling firebase authentication with external providers (for example Microsoft login).
I have button in my main page which calls auth....
1vote
1answer
32views
java file not imported in my kotlin project
Please I am working with kotlin and when I tried to move from one Activity to another using an intent, i got an error on the java keyword which says "unresolved reference" when i click to ...
0votes
2answers
37views
How to send checked items in List View to another activity with Android Studio Kotlin
I have a list of courses in my String resource file.
'''
resources>
<string name="app_name">SecondPart</string>
<string name="done">Done</string>
...
0votes
0answers
16views
Launch Activity while parent is in the Background
I have an Activity A which starts doing some processing in its view model, meanwhile it launches a CustomTab which puts A in the background, when the viewmodel finishes its processing it requires to ...
0votes
0answers
15views
Intent seems to ignore FLAG_ACTIVITY_REQUIRE_NON_BROWSER flag?
I have created a view Intent and set it so that it should only shown non-browser apps that can open that particular link
intent = new Intent(Intent.ACTION_VIEW, uri);
intent.setFlags(Intent....
0votes
0answers
27views
Flutter Android intent ActivityResult
I have to solve following problem:
Calling an Intent from Flutter, waiting for finish the process of the Intent, and return the result to Flutter (call a card reader app trough intent, read the card, ...
0votes
0answers
18views
Is there any way to open "Notifications and status bar" settings in Android?
I want to open the general Notification and status bar settings (not for my app) programmatically in Android, is there any way to achieve this?