how to Stop auto reload in flutter android - android

On of my e-commerce site in top have search bar, but the problem is when I click one this bar its going back and reload the page automatically. But iOS mobile have no problem.
I tried to find problem in .Dart file, then androidmanifest but couldn't find.
Can anyone have any suggestions.

Related

Android studio navigation drawer crash on press

I have made a navigation drawer with Kotlin in Android Studio. When I launch my app to my phone it works like it should. But when I press the actual drawer, the app crashes. I do not know what I miss or have not made correct to make it work. If there are sertain files you need to see please let me know and I'll give it. I have tried searching on the internet but I've not come any further.
I have made an main_nav_drawer.xml file and a main_toolbar. Do I miss something here?

window.close() does not work in BrowserComponent of CodeName One

I have a CodeName One app where I'm using the BrowserComponent to load an HTML page. This HTML page (HTMLPage1) further opens another HTML page (HTMLPage2) on the click of a button using window.open(). This works correctly in the app. This HTMLPage2 has a Close button and on clicking this button, HTMLPage2 should be closed and the control should go back to HTMLPage1. However, this is not working as expected. On clicking the Close button, nothing happens in the app and HTMLPage2 is still shown in the app. I have tried using window.close() and self.close() and neither of them work.
I found the following article on searching
Android Webview: Scripts may close only the windows that were opened by it that seems similar to the problem I am facing
Also, I have a WebView Test app (can be found on PlayStore - search for com.snc.test.WebView Test) on my mobile that lets me modify the WebView settings and launch different URL's. I used this app to check if I can successfully invoke my HTML pages through the WebView Test app. With the default settings, I ran into the same problem as described above. The Close button didn't work.
However, then I modified the setSupportMultipleWindows() property in the app and set it to true. After that, it worked correctly through the WebView Test app. On clicking Close in HTMLPage2, that page was closed and I could see HTMLPage1 again.
So, I tried checking how to set this property in CodeName One. I found that the BrowserComponent.setProperty("SupportMultipleWindows", "true") should be able to do the same thing. When I set this property and tested the app, it still didn't work.
Then I looked through the documentation of
WebSettings.setSupportMultipleWindows
According to this documentation, if set to true, WebChromeClient.onCreateWindow(WebView, boolean, boolean, Message) must be implemented by the host application.
I could not find a way to do this through CodeName One.
Am I going down the right path to tackle this problem? If not, kindly guide me.

GMail App showing my app's page in android

Always facing the problem which is depicted in the below image
Gmail icon and my app icon is there. But the page icon is my app's icon. When opening my app by clicking an url(app related) from Gmail and then minimize my app shows like this. Anyone know the reason?
This is caused by the use of up navigation. However, it is suggested that you do use up navigation. Many people will argue that it isn't intuitive, but that's just the way Android handles this.

Porting Android to BB: When clicking the "Info" button, the app crashes

Recently we ported successfully an Android application on BlackBerry 10.
Everything worked fine, except the thing that when clicking the "Info" button from the action bar that appears at the bottom of the screen - the application crashes.
I suppose that button should display an About, or Help page. We do have in our application a such page (as an ActionItem in the ActionBar).
Does anyone know if there is a way we can fix this, so that when clicking the "Info" button to display our About page? Or at least to do something to prevent the app from crashing, for example hide that button.
Thank you.
I posted this question on BB developer forums, and got a pretty good answer:
This is actually a known issue in the current Android Runtime on the
BlackBerry 10 simulator release. It has nothing to do with your
application, as this action bar is part of the Android Runtime and not
your application. Normally when you section the "Info" button you
would see a screen showing you have to use the back swipe gesture used
in Android Runtime applications. If you wanted your own About button, you would have to create your own menu.

in Cordova 1.8.1 - Android history.back() not working

I am developing a phonegap application in which the app loads the external url(http://example.com) into webview. When I navigate through the screen using window.location.href. I cant able to go back to the previous screen using the soft back button that present in the webview itself.
The android hard back button closes the back(which is fine for now).
Can anyone help me out.
It is the same problem: If jquery mobile does not create history entries, the back-button from the android phone will terminate the app, because, there is no Activity to go back to.
If you go forwrd through your app, make a pushState: https://developer.mozilla.org/en-US/docs/DOM/Manipulating_the_browser_history
If you have history entries, your app will not close and hopefully the soft-back button will work.

Categories

Resources