Alpha Video Training
Results 1 to 5 of 5

Thread: Phonegap app how to show errors in app itself(not console.log)

  1. #1
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Phonegap app how to show errors in app itself(not console.log)

    My phonegap app after renaming few UX now shows blank white screen on actual android phone instead of persistent login screen(it works in browser and preview mobile mode).
    How do I debug or see the issue?

  2. #2
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: Phonegap app how to show errors in app itself(not console.log)

    I think its related to this issue as I tried using session var in phonegap app.
    https://www.alphasoftware.com/alphaf...?t-115717.html

  3. #3
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: Phonegap app how to show errors in app itself(not console.log)

    below works in browser but in phonegap android app with persistent login shows as undefined and session variable also works in browser but pg shows blank screen
    if(typeof {dialog.object} != 'undefined') {
    //your code here
    var stateData = {dialog.object}.getStateInfo();

    //Read the 'myvar1' property from the state info object
    var x = {dialog.object}.stateInfo['myvar2'];
    alert(x);
    }

  4. #4
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: Phonegap app how to show errors in app itself(not console.log)

    same type of issue here-
    https://www.alphasoftware.com/alphaf...-not-being-set

    I want to set additional variables after login(user group and other info and use it to activate/deactivate panelcards) but its only working in browser but not on mobile pg app.

  5. #5
    Member
    Real Name
    Amit lohogaonkar
    Join Date
    Mar 2017
    Location
    NJ
    Posts
    428

    Default Re: Phonegap app how to show errors in app itself(not console.log)

    persistent login is not working for us because of following scenario
    I just do not want to set one panel but rather based on current user group I want to activate player panel or coach panel and in persistant login client side script I am not able to get current user group. (try using persistent login mobile sample provide by ALPHA and try to redirect to panel after second peristant login based on token but by adding additional check of user group and activate panel based on token and usergroup.

    {dialog.object}.panelSetActive('PANEL_APPLICATION',false);

    if(token != '' ) {
    //token is present and not blank
    //(we don't know if the token is valid or has not expired as the token cannot be decoded on the client-side)
    //(we will only find out if the token is valid when an ajax callback is made to the server)

    //since token was present you can take the user directly to the application panel [PANEL_APPLICATION].
    //must also add the token to the UX state object so that it gets sent back on all Ajax callbacks

    {dialog.object}.stateInfo['token'] = token;

    {dialog.object}.panelSetActive('PANEL_APPLICATION',false);

    //TIP: If you want to implement a client-side login, you could take the user to the client-side login panel
    //rather than to the [PANEL_APPLICATION] panel. If the user then successfully authenticates at the client-side login panel
    //you would then set focus to the [PANEL_APPLICATION] Panel.
    } else {
    //token not found or is blank - user must log in
    {dialog.object}.panelSetActive('PANEL_LOGIN');

    }

Similar Threads

  1. Control Bar Wont Show After Building In Phonegap
    By swest in forum Mobile & Browser Applications
    Replies: 5
    Last Post: 01-26-2017, 11:18 PM
  2. Replies: 6
    Last Post: 09-02-2016, 05:40 PM
  3. Phonegap - Android - png images only show as boxes
    By Mike Perry in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 08-02-2014, 01:53 PM
  4. PhoneGap how to catch errors and other help needed.
    By -Jinx- in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 04-23-2014, 12:34 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •