Promissed to share my webView/webApp script.

Promissed to share my webView/webApp script.

Please read first lines of the script and view the moviie for instructions.

]]>

24 Commentsto Promissed to share my webView/webApp script.

  1. Anonymous says:

    < ![CDATA[

    // webviews work best on first page.


    // After resize, reload LL



    // usage: check data. and enter:


    // zoom;url



    LL.bindClass(“android.webkit.WebView”);


    var context = LL.getContext();



    var mydata = data.split(“;”);


    var myZoom = mydata[0];


    var myURL = mydata[1];



    var webView = new WebView(context);


    webView.getSettings().setJavaScriptEnabled(true);


    webView.setInitialScale(myZoom);



    // webView.loadUrl(“http://forecast.io/embed/#lat=52.3&lon=4.68&name=Holland&units=ca” );


    webView.loadUrl(“http://”+ myURL);


    return webView;  

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Looks like a radar widget, bad ass man.. Only 2 other apps make a live radar widget and isn’t moving like this.. I want something very similar

    ]]>

  3. Anonymous says:

    < ![CDATA[

    And of course, it will take any url from the web.


    Commented in the source the forecast.io link from my preview is still there. On their site is a link to figure out your lat/long.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    that’s right and the bad thing about aweather widget especially if you got live motion on it and updating like a radar would, check out the app eweather and look how much juice that sucker sucks up running those widgets like that. But I could see this being a lot more efficient. But again with a widget there’s convenience of not really having to know what to do but put it on the screen which I’m not far past myself lol

    ]]>

  5. Anonymous says:

    < ![CDATA[

    Awesome, this works great.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    Jappie Toutenhoofd Still I have a question, How does it supposed to update data. I had it in a map, but noticed during the day that opening the map (with wifi on) does not update data. So as you said in the script, now I put the widget in the first (and only) page in my desktop. Yesterday tested it all day but it would not update data. This morning at 7.50am I finally had a data update, but that is now 2 hours old and I would like to refresh data. How can I do that?

    ]]>

  7. Anonymous says:

    < ![CDATA[

    The refresh of the html-page is different per page. And dependent on the maker of the link/site-maker. The CustumWebView uses ‘default’ for cache management. This means, if the site says this is valid for 2 hours. The Webview will use this html-page from cache for 2 hours. I think (!), I saw it work like this for forecast-io, wich is an official widget.


    But there is no reloading from LLX-side. So if you want to be sure, put a reload-launcher short-cut close to your widget.



    Personally…: rather have old data then a big mobile-data bill. (a,k,a, in Holland: “A lot of month left at the end my data”)

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Hmmm, so I was thinking If you could do that with a real webpage to show in Custom view, You can do that with a self made Html page with specific data saved on my sd card. (tried today, because thats awesome) If I wanted that html page to be updated by clicking the reload launcher and not connected to wifi (I do not use mobile data) then the pages that need internet wil refresh also leaving an error text could not load page because no internet. So maybe we could have a refresh item/Custum view option in the settings. So we could update manualy the items that do not need internet connection. Is that possible? +Pierre Hébert

    ]]>

  9. Anonymous says:

    < ![CDATA[

    Pierre Hébert What do you think? first link with your name did not work so I tried 2nd time.


     edit: as option for tap / swipe function for that item I mean.

    ]]>

  10. Anonymous says:

    < ![CDATA[

    A way to update manually the webview could be to set the following script on the long tap event of the custom view:


    LL.getEvent().getItem().getView().loadUrl(the_url_to_load);


    Is this what you are looking for ?

    ]]>

  11. Anonymous says:

    < ![CDATA[

    Yep, i think so! With that i can make an pause and resume script, with an parameter how often it should do this.

    ]]>

  12. Anonymous says:

    < ![CDATA[

    Thank you, Pierre Hébert​ that works great.


    Yes Jappie Toutenhoofd​ if you could make a pause and resume script, that would be nice. Thank you.

    ]]>

  13. Anonymous says:

    < ![CDATA[

    Evelien Wijbenga I finally took some time to put it in the Wiki:


    http://www.pierrox.net/android/applications/lightning_launcher/wiki/doku.php?id=script_webview_with_refresh



    Pierre Hébert the refresh was even simpeler than you sugested:


    LL.getEvent().getItem().getView().reload

    ]]>

  14. Anonymous says:

    < ![CDATA[

    Awesome Jappie Toutenhoofd​ thanks, I will check it later this evening.

    ]]>

  15. Anonymous says:

    < ![CDATA[

    Jappie Toutenhoofd awesome! I used WebView several times in the past and I wasn’t aware of this reload method! Great to have learned about it 🙂

    ]]>

  16. Anonymous says:

    < ![CDATA[

    very good.



    please help me to add a condition in resume I suppose : when no internet don’t update , like the control of the refresh interval


    ]]>

  17. Anonymous says:

    < ![CDATA[

    Jay M​ Jappie Toutenhoofd​ TrianguloY​ Pierre Hébert​ Please what is the if I have to add ?


    Something like : if (TheInternet is true) just before if nu- >

    ]]>

  18. Anonymous says:

    < ![CDATA[

    What is the name of your variable. And is it a LL-variable, used for binding?

    ]]>

  19. Anonymous says:

    < ![CDATA[

    Jappie Toutenhoofd it’s your scripts with no change. It’s not bindings but web view.


    Noticed there is no issue when I don’t have internet ( buiten )


    Zo alles is OK.

    ]]>

  20. Anonymous says:

    < ![CDATA[

    Yes, I understand you only want an extra condition: Refresh depending on the availability of ‘theInternet’.


    But LL has no standard variable for this. So, we need an extra variable telling us if we have ‘ Mobistar ‘ Or ‘ HomeNetwork’.


    There are scripts around here for this, and I think (did not check) they use a LL-variable/binding.


    I need to know this (or your) variable-name to retrieve it in WV-resume-script to code the extra ‘IF’.


    Begrijpt u?

    ]]>

  21. Anonymous says:

    < ![CDATA[

    Jappie Toutenhoofd Ja


    No problem


    I am on internet only through Wifi


    I think your scripts are fine as is.

    ]]>

  22. Anonymous says:

    < ![CDATA[

    Whenever I set the script in the create event, the link is opened by my browser. Is there any setting or so which I forgot to set in order to make the custom view item handle the link? Im running MM, Internet permission is set…

    ]]>

  23. Anonymous says:

    < ![CDATA[

    how do I add the Internet permission? I installed the internet permission app from the link given in the repository importer, but the internet permission doesn’t show up in the list of permissions for lightning launcher. I’m using a galaxy On5 running Marshmallow.

    ]]>

  24. Anonymous says:

    < ![CDATA[

    Do not know if it does show up somewhere, if it does not work directly, restart your phone might work.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *