onactivityresult Questions
4
What is the alternative to get callback for startUpdateFlowForResult in InAppUpdates instead of onActivityResult since it is deprecated?
Maestro asked 27/10, 2021 at 12:54
4
I have following code
val getContent = registerForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
//Some code here..
}
and somewhere else ,
getContent.launch("applicat...
Hunnish asked 26/3, 2021 at 8:42
4
Solved
I want to use onActivityResult in a class which not extends activity but this class has a global variable as an instance of activity. This class is similar to this :
public class myClass(){
publi...
Kibitzer asked 9/1, 2016 at 9:1
2
I need to make the user able to pick only documents types (ex: pdf, docs, xls) from phone storage using the new Activity Result API, but the problem is that when I launch the contract like the foll...
Forgive asked 25/12, 2021 at 14:52
30
Solved
I recently discovered that onActivityResult is deprecated. What should we do to handle it?
Any alternative introduced for that?
Motorway asked 1/7, 2020 at 6:46
5
Solved
I have a Location activity that can be called from many activities, such as Sign up and Order. In the Location activity the user enters his location, so the activity Location will return this new l...
Unblinking asked 9/2, 2013 at 7:5
8
I have a main activity which serves as an entry point to call different activities, depending on condition. Among others, I use Firebase Auth to manage user sign in:
startActivityForResult(
AuthU...
Indiscrete asked 27/4, 2020 at 9:12
3
Sometimes I'm getting this IllegalStateException, and it says that you must ensure the ActivityResultLauncher is registered before calling launch(). But there is no method to check if ActivityResul...
Soap asked 3/12, 2021 at 8:24
1
I'm using the NavController to start an activity - which has its own navigation graph - for the login/register flow.
Now I would like to have the result of LoginActivity(success, failure) inside th...
Ophthalmologist asked 25/3, 2019 at 12:56
3
Solved
So I'm using a gps class to turn on the gps and here's a method that allow us to send to onActivityResult, but since is deprecated on AndroidX and still available, android team recommend us the nex...
Wideawake asked 15/12, 2020 at 8:47
3
I am using in-app updates for android and as per the documentation, they are using onActivityResult to handle app behaviour incase the update is interrupted.
This is my function that is called from...
Conspecific asked 22/12, 2020 at 13:13
7
Problem when i am calling to enable gps programatically using GoogleApiClient into fragment...
My code is..
final Status status = result.getStatus();
final LocationSettingsStates state = result....
Scabies asked 14/7, 2017 at 7:3
3
Solved
I have RecyclerView with very complex item, multiple buttons/images/texts.
To access each button/image I set my click Listeners inside my Adapter class.
But now I am trying add function to set co...
Pestle asked 17/12, 2015 at 17:27
4
Solved
Read My Whole Code. It is working perfectly on every Phone except Marshmallow and Lollipop. In Marshmallow and Lollipop phones Only problem is coming in data.getData() returning null only in case o...
Mentally asked 20/9, 2016 at 13:48
4
In my app if the user doesn't have the location turned on I am prompting with a dialog and then trying to return that result (probably incorrectly) by overriding on activity result.
This is inside...
Seagirt asked 18/10, 2016 at 14:22
2
The contract has been changed to return Boolean instead of Bitmap starting in androidx.activity version 1.2.0-alpha05. How can I use the Boolean returned by the built in AndroidResultContracts.Take...
Protonema asked 13/8, 2020 at 21:26
6
Solved
I dont' understand why we use method getIntent().
Because, when we need that method, We can use method onActivityResult().
But by using the method getIntent(), it could cause NullPointerException...
Hui asked 3/11, 2014 at 19:53
6
Solved
I would like to add this to another list of questions about resultCode == 0 and requestCode == 0.
Here is the synopsis:
NoteActivity calls NoteSettingsActivity using startActivityForResult().
I h...
Phane asked 30/4, 2015 at 15:44
5
I'm working on an image editing Android application. In one of my activities I call an intent to pick an image from the gallery in onCreate() like this:
Intent intent = new Intent();
intent.setType...
Xanthein asked 5/12, 2017 at 9:37
8
I want to know is it possible on onActivityResult()to use inside Fragment and if yes then how it works please explain with example.
Organogenesis asked 19/6, 2017 at 4:34
0
I register for an intent callback to get content via:
val pickPhotosFromLibrary = registerForActivityResult(ActivityResultContracts.GetMultipleContents()) { uris: List<Uri> ->
// Handle u...
Duester asked 31/1, 2021 at 2:23
1
Solved
OnActivityResult() is deprecated in androidx. I took reference from below links
https://developer.android.com/training/basics/intents/result
https://developer.android.com/jetpack/androidx/releases...
Niu asked 5/12, 2020 at 14:59
2
Today I switched to the new ResultAPI and I faced this error:
java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode
at androidx.fragment.app.FragmentActivity.checkForValid...
Phosphor asked 7/7, 2020 at 9:18
1
I'm trying to use the new Activity Results API to replace startActivityForResult.
If I call registerForActivityResult in a Fragment everything is OK. However if I call the same method in an AppComp...
Aftmost asked 2/7, 2020 at 16:41
10
Solved
I'm having some issue with zxing onActivityResult().
As you can see in the code I did properly invoke new intent as described in https://code.google.com/p/zxing/wiki/ScanningViaIntent.
The quest...
Comstockery asked 16/11, 2013 at 0:48
1 Next >
© 2022 - 2024 — McMap. All rights reserved.