GithubHelp home page GithubHelp logo

Comments (13)

jaunesarmiento avatar jaunesarmiento commented on May 3, 2024

Hi there @aboudard, no I believe this is not "normal". What version of Fries are you using?

from fries.

aboudard avatar aboudard commented on May 3, 2024

I use 1.0.0 according to the readme, I juste downloded the master.
I tried just now to catch the backbutton with phonegap, but with no success, I try harder :D

from fries.

jaunesarmiento avatar jaunesarmiento commented on May 3, 2024

Alright. Can you try doing a console.log() inside the code where you try to catch the back button? I'm very willing to help you with your problem. :)

from fries.

aboudard avatar aboudard commented on May 3, 2024

I am right now :)
I can't load any console at all on new-contact.html ...

Added this in the bottom of the page (works perfect in index.html)


<script src="js/cordova-2.7.0.js"></script>
<script>
    window.addEventListener('load', init, false);
    function ready(e){
        console.log("Loaded");
        document.addEventListener("backbutton", onBackKeyDown, false);
    }

    function onBackKeyDown() {
        window.history.go(-1);
        console.log("Back");
    }

    function onError(error) {
        console.error(JSON.stringify(error));
    }

    function init(e){
        document.addEventListener('deviceready', ready, false);
        console.log("Init Loaded");
    }
</script>

from fries.

jaunesarmiento avatar jaunesarmiento commented on May 3, 2024

But will the app still exit if you press the back button on index.html?

Edit: I currently don't have an Android phone right now that's why I'm asking. xD

from fries.

aboudard avatar aboudard commented on May 3, 2024

Well, it seem like there is really a problem with the back button, when I have activated multiple tabs, it looks like application is freezing, and sometimes I see the pages with no style at all ... pretty bad ... I try to see if this behavior is caused by the webview component, I'll install Fries on a http server to be sure.

from fries.

jaunesarmiento avatar jaunesarmiento commented on May 3, 2024

Hmm. That's odd. Is there any particular reason why you're catching the back button functionality? Cause when I tested this, I never had to catch the back button and still it works fine.

By the way, the style on other pages does not load if stack.js fails to load properly in index.html.

from fries.

aboudard avatar aboudard commented on May 3, 2024

Yes, that's very strange. here is what I did :

  • I see that pressing back button on the device makes me go out of application even when I am on new-contact.html for example.
  • I think "hey let's see what phonegap says in the backbutton event"
  • I plug phonegap.js, set the listener (in new-contact.html)
  • no luck, absolutely no javascript is loaded, native or phonegap event ... none
  • I plug phonegap.js and listeners in index.html > events work just fine
    ...
    I keep on :)

from fries.

aymanfarhat avatar aymanfarhat commented on May 3, 2024

@aboudard I just tested your code for the back button issue on a phonegap project with Fries, the problem is non existent. In addition to that I highly doubt that the problem is stemming from stack.js , I suggest trying on the side a new Phonegap project without Fries and implement dynamic page loading (which is similar to how Stack.js does) and test the app on the same device.

from fries.

aboudard avatar aboudard commented on May 3, 2024

Well there is no "code of mine" to test, my simple test was to install both on a device and an emulator a simple Android / Phonegap app with fries demo pages.
I will try to work on a brand new project like you say, thanks for the advice.

from fries.

aboudard avatar aboudard commented on May 3, 2024

Ok, I made a new Phonegap app with phonegap build, starting from both sample project from Fries and Phonegap-start, and the problem doesn't happen !

My first phonegap project (with the bug) was built with the Android dedicated ant command line "create" ... I will try to reproduce, that might be a good advice ... not using this build ... :|
that would be more relevant than saying "non existent" ;)

from fries.

jaunesarmiento avatar jaunesarmiento commented on May 3, 2024

Thanks @aymanfarhat. I couldn't test the problem.

@aboudard you could also try to build and install https://github.com/jaunesarmiento/HelloFries on your device. That project was made using ./create <project_folder_path> <package_name> <project_name> command from the Cordova Android distribution.

from fries.

jaunesarmiento avatar jaunesarmiento commented on May 3, 2024

Back button seems to be working fine on v2.0.0

from fries.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.