$200 to clean up code ,speed up Map Icon loads, general Maintenance

16 posts, 1 answers
  1. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 10 Jan 2013 Link to this post

    Hello Everyone !


    Developer had a Baby and no longer available.. My App was made with PhoneGap and is on Google Play. My laymans attempt to work on it in PhoneGap ..pretty much  a disaster.. sdks, keystores etc.. slowly getting it ..just a  big curve for a non developer like my self .

    I loaded the html ,css, scripts in Icenium Graphic and even a breeze for me..I can go in a fix odd and end errors..white space , missing closing tags etc.. but cannot actually sit and write code ..so this is what I need help with


    Fuel Station locator .

    Has some issues that need addressed: These are typical complaints of the APP

    1. Slow Map Icon Loads..(takes 10 seconds) (if nothing else ..load Map/icons in the Background First as APP is Loading ..then when the user selects "MAP" from Menu ..it will pop right up already loaded
    2. Needs a "real" exit App.. 
    3. Needs a "real" reload/refresh.. 

    and then answer a few support questions as I try and get the APP on Apple(I do have  a Individual developers account) and Windows Market

    $200



    Those are the 3 things that need to be done


    It looks like most of the html,css and scripts should be good for Icenium..as I am able to get the APP to fire up in Graphic but getting "you must be connected to the internet to use this APP"  error.     I see that text in a couple of the .js files but not sure exactly what that issue is and how to fix it

    And then give me a quote to add:
    One thing I would like to add is Directions from the users GPS position to whatever station they select.. give me a quote on that feature.. speaking of the Map is it possible to Make the Map move like on a Garmin ..?  Instead of refreshing Map ?

    Anyway.. anyone interested ..at least taking a look let me know .. I could probably use someone for continuing Maintenance on it as well..so when Android , Apple changes code and screws up the APP to go in and fix it ..  as well as someone to add new features as users start requesting this and that







  2. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 10 Jan 2013 Link to this post

    Thi sis how far I got in Icenium Grpahite/Mist http://www.e85prices.com/e85internet.PNG

    Turned off my firewall for a few minutes as well to make sure that wasn't preventing it from access internet
  3. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 11 Jan 2013 Link to this post

    Whoa..slow down ..not everyone all at once !  :grin:

  4. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 12 Jan 2013 Link to this post

    I know by experience that checking for a working network/internet/wifi connection doesn't work. Instead of the check, be sure to have an error handler in case an internet connection (api/webservice call) fails.
  5. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    Good Morning Jan-Dirk


    Remember I am almost a complete noob at this..   so the error handler would be code that prevents or does something when an error happens..the error handler would be in the js or php or html  or all 3 files?  


    The best I cant sort out is that the issue is from the common.js file


    // global variable that will tell us if PhoneGap is ready
    var isPhoneGapReady = false;

    // default all phone types to false
    var isAndroid = false;
    var isBlackberry = false;
    var isIphone = false;
    var isWindows = false;

    // store the device's information
    var deviceUUID;
    var deviceName;
    var devicePlatform;
    var devicePhoneGapVersion;
    var deviceOSVersion;
    var deviceConnectionType;

    // store the current network status
    var isConnected = false;
    var isHighSpeed;


    function onDeviceReady() {

    // hide splashscreen
        navigator.splashscreen.hide();
        
        // set to true
        isPhoneGapReady = true;
        
    // detect the device's information
        deviceUUID = device.uuid;
    deviceName = device.name;
    devicePlatform = device.platform;
    devicePhoneGapVersion = device.phonegap;
    deviceOSVersion = device.version;
        
        // detect the device's platform
        deviceDetection();
        
        // detect for network access
        networkDetection();
        
        // execute any events at start up
        executeEvents();
        
    }

    function executeEvents() {
        if (isPhoneGapReady) {
            // attach events for online and offline detection
            document.addEventListener("online", onOnline, false);
            document.addEventListener("offline", onOffline, false);

    // attach events for pressed button detection
    document.addEventListener("menubutton", onMenuButton, false);
    //document.addEventListener("backbutton", onBackButton, false);
    document.addEventListener("searchbutton", onSearchButton, false);
            
            // attach events for pause and resume detection
            document.addEventListener("pause", onPause, false);
            document.addEventListener("resume", onResume, false);
        }
    }

    function deviceDetection() {
        if (isPhoneGapReady) {
            switch (device.platform) {
                case "Android":
                    isAndroid = true;
                    break;
                case "Blackberry":
                    isBlackberry = true;
                    break;
                case "iPhone":
                    isIphone = true;
                    break;
                case "WinCE":
                    isWindows = true;
                    break;
            }
        }
    }

    function networkDetection() {
        if (isPhoneGapReady) {
            // as long as the connection type is not none, the device should have Internet access
            if (navigator.network.connection.type != Connection.NONE) {
                isConnected = true;
            }
            
            // determine if this connection is high speed or not
            switch (navigator.network.connection.type) {
                case Connection.UNKNOWN:
                case Connection.CELL_2G:
                    isHighSpeed = false;
                    break;
                default:
                    isHighSpeed = true;
                    break;
            }

    // get the text to use in user notifications
    var states = {};
    states[Connection.UNKNOWN] = "Unknown connection";
    states[Connection.ETHERNET] = "Ethernet connection";
    states[Connection.WIFI] = "WiFi connection";
    states[Connection.CELL_2G] = "Cell 2G connection";
    states[Connection.CELL_3G] = "Cell 3G connection";
    states[Connection.CELL_4G] = "Cell 4G connection";
    states[Connection.NONE] = "No network connection";
    deviceConnectionType =  states[navigator.network.connection.type];
        }
    }

    function onOnline() {
        isConnected = true;
    }

    function onOffline() {
        isConnected = false;
    }

    function onPause() {
        isPhoneGapReady = false;
    }

    function onResume() {
        // don't run if phonegap is already ready
        if (isPhoneGapReady == false) {
            isPhoneGapReady = true;
        }
    }

    function onMenuButton(){
    //handle the menu button
    //$.mobile.changePage("#home-page" );
    }

    function onBackButton() {
    //handle the back button
    }

    function onSearchButton(){
    //handle the search button
    $.mobile.changePage("#search-page" );
    }

    document.addEventListener("deviceready", onDeviceReady, false);
  6. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    Here ?


    function networkDetection() {
        if (isPhoneGapReady) {
            // as long as the connection type is not none, the device should have Internet access
            if (navigator.network.connection.type != Connection.NONE) {
                isConnected = true;
  7. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    And then in the Main.js


    This part fo the code part seem s"important"  (excuse the noob expression)

    // settings
    $('#settings-page').live('pageshow', function () {
    if (isConnected) {
    loadSettings();
    } else {
    notify('You must be connected to the Internet to use this app.', null, 'Connection Error', 'OK');
    $.mobile.changePage('#home-page');
    }
    });

    $('#settings-save').click(function() {
    saveSettings();
    });
  8. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    So is this an example of a error handler ..  if it cannot connect to the internet ..the app uses the "notify" statement.."you must be connected to the internet.."

    if (isConnected) {
    loadSettings();
    } else {
    notify('You must be connected to the Internet to use this app.', null, 'Connection Error', 'OK');


    BTW..that error is coded for all 4 of the menu items  ..  Map..Search..Menu..Favorites.. whenever I click on any of those "buttons" in Mist or Graphite..  
  9. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 12 Jan 2013 Link to this post

    A tiny correction on my previous post. Often the connection check works well, but I have had reports from some users that the connection status on for example a Samsung Galaxy S3 wasn't working correctly.

    The function 'networkDetection' that is called is, as far as I see, called only once. Only at the start of the app. It could very well be that there is a valid network connection when the apps starts, but not when a connection is needed later.

    When I commented on the network connection check not working correctly on some devices (this is a Cordova problem, not Icenium!) I was suggested to do no check at all but use error handling.

    I have been using web services calls with xmlhttprequest. If a xmlhttprequest is executed, it can go well or it can go wrong. In case it runs ok you run the code that handles the response, but when an error occurs (for example due to no network connection) it runs the function you define for error handling. For example in case of a timeout or other errors you can display the alert.

    In your initial emails you also write about image loading you say that it takes time to load some of the icons. Maybe you can include these icons in your project?
  10. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    Thanks Jan-Dirk ..OK I'll go read up on xmlhttprequest

    Not sure what you mean ""maybe you can include these icons in your project?"

    These are the icons that that load slow http://www.e85prices.com/map12.jpg    The APP connects to a live mysql database 


  11. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    Hey Jan-Dirk one other thing..OK So I am in Icenium Graphite.. looking at the .js files and the little Phone Icon in the bottom of the screen is yellow says I have no devices connected.. So I pull in my Galaxy and in Graphite I  select "Run" and from "On Device"  ..

    and on MY Galaxy I get the usePolling

    gap_callbackServer
      I click ok.. and getPort
    gap_callback Server comes up

    I click OKand
    getToken
    gapcallbackServer pops up

    I click ok and I get my first screen on the APP..  I then click any Menu item and then get the connection error message..must be connected to internet



    So CallbackSever messages does that ring a bell ..does that zero in on why not connecting?
  12. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    Interesting.. so the problem may be that I have some PhoneGap properitary" .js   ..trying to run through icenium ?

    https://groups.google.com/forum/?fromgroups=#!topic/phonegap/jOwrJnJXr9U
  13. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    OK ..just kind of posting possible solutions/references as I sort this out..

    This guy was showing the same errors on a Blackberry emulator http://www.warrenequipmentservices.com/temp/9800.jpg

    https://groups.google.com/forum/?fromgroups=#!topic/phonegap/SFc1xWUNGIQ


    So possibly I am using PhoneGaps cordova when I need to use Iceniums?  or I am using the wrong versions ..or .. 


  14. Answer
    Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    I Give up..  Something as basic as connecting to the internet..total pia

    I'm just wasting time..

    I need to hire someone to take care of this for me..   I'll add another $100= $300

    get it to connect ot the internet using Icemium and complete these 3 things

    1. Slow Map Icon Loads..(takes 10 seconds) (if nothing else ..load Map/icons in the Background First as APP is Loading ..then when the user selects "MAP" from Menu ..it will pop right up already loaded
    2. Needs a "real" exit App.. 
    3. Needs a "real" reload/refresh
  15. Jan-Dirk
    Jan-Dirk avatar
    327 posts
    Member since:
    Jun 2012

    Posted 12 Jan 2013 Link to this post

    Instead of loading icons through your internet connection every time you can include them in the app itself. Download them, put them in a folder and instead of refer to the images in the project.

    If internet is slow, then images will load slow and of course it will impact loading (google?) maps. There is nothing much that can be done about that.

    If you are willing to share your code with me I will see what I can do to get you up and running.
  16. Dan
    Dan avatar
    26 posts
    Member since:
    Jan 2013

    Posted 12 Jan 2013 Link to this post

    That would be great! .. The Forum appears not to have a way to contact other members?  Can you send me an email /////////and I'll email  you the files
      Send me your paypal (email) info as well


    I'll send you the .apk file and you play around and see that the APP does work..
Back to Top