In my android application as soon as the user clicks on the application icon from menu the app is getting launched.It is happening even if the application is open earlier.
I would like to maintain the state like if the application is opened then the app should show the default opened page and should not launch it again.
Please let me know your valuable suggestions.
Thanks in advance :)
Hey i solved this issue.Earlier i was using android:launchmode as single instance.When i removed this its working fine :)
Related
Can I add some handle after user press Home button in android ?
Such as show modal ask user need to exit app or cancel.
I see this link Detect home button press in android can helpful.
But I do not know how to apply that code to MainActivity.java of android in react-native.
onUserLeaveHint is work after app close but I need modal work before app close.
Thank for any help.
I was able to solve it myself. I open sourced my solution here - https://www.npmjs.com/package/react-native-home-pressed Let me know what you think
I'm trying to implement Chrome Custom Tabs but in my small example, everytime I launch a URL it asks me with which browser I'd like to open it.
I've seen some apps like Twitter official app where the Custom Tab opens without asking anything to the user. How can I achieve that?
Thanks in advance
EDIT:
I've followed this tutorial, so my code is 99% the same and the issue is the same in both codes.
I´ve solved the issue. I was launching the URL inside a RecyclerView when a CardView was clicked.
The problem is I was warming up the tab at the same time I was launching it. After changing that, everything worked fine.
Problem 1:
I have developed a app which works fine but when it is installed a shortcut gets created by default as in most android devices . The shortcut just has a logo and not the name of the app. Whereas the app does have name/label in menu.
Problem 2:
The app also doesn't shows up in the multi-task(when the box button is pressed --android L), the app quits on pressing the multi task button and when restarted it starts from where it was left. so the activity is not killed but still does not show among the background processes in multi task view.
If there is a need of any code , please ask for it.
Any help is appreciated.
Problem 1:
Did you set the name of the app?
Problem 2:
Don't have a lot to go with so...
What launchMode property are you using in the activity?
Sorry i didnt add the Android.manifest file, apparently i had a blank label for my launcher activity. Giving it a value made it work.
<activity... android:label=""/>
Sorry if this is not the best title, this is my first question here.
I'm developing a mobile app to read barcodes. In my app there is a login form before the main form loads. On the main form I put action list and add TTakePhotoFromCameraAction action to open the device camera and take photo using it. So far is working well, I'm following the tutorial here.
But after pressing the yes button after taking photo, my app returns to the login form where I assume it is restarted while it should be back to the main form where I call the action.
So what am i missing here. The code I use is the same as the tutorial above.
I'm using Delphi XE 6 update 1
Please let me know if I miss some information you need. Thanks in advance
Iwan
I experienced this same problem. To fix, in your android device, go to Settings > Developer options, uncheck 'Do not keep activities'.
I am creating an android app in which I want to take screenshot of my device when i click on myapp icon and when myapp launch set the screenshot as background of myactivity, I searched alot but cant find any solution anyone please tell me how i can achieve this task?
When users click on the launcher icon (the icon of your application in the menu of your device) the application is launched.
This is managed by Android itself and you can't override/change this behavior.
It means that it is not possible to do something on the device before your application is launched.