Alpha Video Training
Results 1 to 14 of 14

Thread: Mobile app and Surface Pro

  1. #1
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Mobile app and Surface Pro

    Hi,

    I have a mobile app that I have developed on AA. I use Phonegap to build it for Android and iOS. The app works well on both devices.

    However, I have been asked if it will run on a Surface Pro. My initial response was yes as I can just point the browser to the app on the AA server and it should be fine.

    But there are two areas of concern. Firstly, the app makes use of lists and their offline capabilities. When the device goes offline, the app will store the data input by the user (which includes list data, form data, photos, etc) on the device, and when back online, a sync can be performed to sync the data to the server. Secondly, it makes use of the driver for the camera on the relevant OS (Android or iOS). I don't believe there is an equivalent Windows camera driver available integrated with AA.

    So is there a way to run this app on a Surface Pro with both the offline mode and direct photo capture? Any suggestions welcome.

    Cheers,
    Greg

  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,623

    Default Re: Mobile app and Surface Pro

    Generally, the Surface Pro should be fine as long as you don't attempt to use any PhoneGap Build plugins (not drivers) while using the Surface Pro.

    If your List is persisting data to LocalStorage then you should be ok.

    You'll need to double check your image Actions to ensure they are using an HTML5 option for the Surface Pro.

  3. #3
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    I'm still a little unsure. I assume I need to 'package' the app and 'install' it on the Surface Pro. How do I go about this?

    Greg

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,623

    Default Re: Mobile app and Surface Pro

    You said you were going to run it as a web app through the browser on the Surface Pro. I wouldn't bother doing anything else. You'd have to check every plugin you're using to ensure it's been built for a Windows App. You think getting iOS and Android running an HTML5 app is tough... just try Windows... yikes.

  5. #5
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    The issue is the offline mode. If I open the app in the browser when online, and then turn off the wifi, it seems that the app is cached in the browser and I can access all the panels.

    However, if I then close the browser and re-open it (with the wifi still off), it can't connect to the app and as the cache has been cleared, it can't be accessed.

    What I wanted was similar to the Android or iOS versions, whereby the app is packaged and installed on the device which can then be accessed offline. Is it possible?

    Greg

  6. #6
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,623

    Default Re: Mobile app and Surface Pro

    You can try build for Windows under PhoneGap Build. This produces an appx file... UWP... Universal Windows Platform. You'll need to investigate specific needs for this type of build. Although Alpha includes the option to build for it, Alpha has not provided any supporting documentation.

    I tried a couple of months ago and it was pure frustration. Also, not all plugins support Windows, but List off-line options should work. I think it's a really interesting option and I feel more people would use it... if they knew about it... and if Alpha presented some kind of documentation to help create and then install a UWP app.

    The main problem I ran into was getting the app package signed with a trusted certificate... and then getting it installed. At each step... as I completed what was needed... I'd get a new install error.

  7. #7
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    I was able to install the app by using this procedure to install a trusted certificate:
    1.Right click on APPX file
    2.Click Properties
    3.Click Digital Signatures
    4.Select Signature from the list
    5.Click Details
    6.Click View Certificate
    7.Click Install Certificate
    8. In the Store Location group, tap the radio button to change the selected option to Local Machine.
    Click Next. Tap OK to confirm the UAC dialog.
    9.In the next screen of the Certificate Import Wizard, change the selected option to Place all certificates in the following store.
    10.Tap the Browse button. In the Select Certificate Store pop-up window, scroll down and select Trusted People, and then tap OK.
    11.Tap the Next button; a new screen appears. Tap the Finish button.

    However, trying to run the app results in some windows errors (eg):
    Fault bucket , type 0
    Event Name: WWAJSE
    Response: Not available
    Cab Id: 0

    Problem signature:
    P1: GregCarmody.MobileEDC_0.0.1.0_x86__h35559jr9hy9m
    P2: MobileEDC
    P3: a35b
    P4: 3
    P5: ms-appx://gregcarmody.mobileedc/www/phonegap.js
    P6: 1831_1


    I'll try to disable the phonegap plugin and see if that helps.

    Greg

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,623

    Default Re: Mobile app and Surface Pro

    I don't have the Digital Signatures tab. I had to go through the process of using SignTool.exe etc. and then still got errors. It was a mess.

  9. #9
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    Have got the app to run, just had to regenerate the phonegap asset files. However, the login is failing, not sure why. Currently trying to debug it.....

  10. #10
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    Seems like there is no communication with the AA server? Not sure why....

  11. #11
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,623

    Default Re: Mobile app and Surface Pro

    I'd try to help but I can't get past the certificate stuff.

  12. #12
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    Tried running this in Visual Studio, and getting the following errors:

    'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/3.0)'.
    Exception was thrown at line 2, column 10459 in http://code.jquery.com/jquery-latest.min.js
    0x800a139e - JavaScript runtime error: SyntaxError
    Exception was thrown at line 2, column 10862 in http://code.jquery.com/jquery-latest.min.js
    0x800a139e - JavaScript runtime error: SyntaxError
    Exception was thrown at line 18069, column 5 in ms-appx-web://au.com.hymans.mobileedc/www/javascript/a5.js
    0x800a138f - JavaScript runtime error: Unable to get property 'controlType' of undefined or null reference
    Exception was thrown at line 18069, column 5 in ms-appx-web://au.com.hymans.mobileedc/www/javascript/a5.js
    0x800a138f - JavaScript runtime error: Unable to get property 'controlType' of undefined or null reference

    Also:

    0x800a138f - JavaScript runtime error: Unable to get property 'allow' of undefined or null reference
    Exception was thrown at line 13299, column 4 in ms-appx-web://au.com.hymans.mobileedc/www/javascript/a5.js
    0x800a138f - JavaScript runtime error: Unable to get property 'version' of undefined or null reference
    Exception was thrown at line 21846, column 3 in ms-appx-web://au.com.hymans.mobileedc/www/javascript/a5.js
    0x800a138f - JavaScript runtime error: Unable to get property 'toUpperCase' of undefined or null reference
    Exception was thrown at line 14461, column 4 in ms-appx-web://au.com.hymans.mobileedc/www/javascript/a5.js
    0x800a138f - JavaScript runtime error: Unable to get property 'getAppFileStorageDir' of undefined or null reference
    Exception was thrown at line 1192, column 9 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1196, column 17 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1192, column 9 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1196, column 17 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1192, column 9 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1196, column 17 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1192, column 9 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 1196, column 17 in ms-appx-web://au.com.hymans.mobileedc/www/plugins/cordova-plugin-file/src/windows/FileProxy.js
    0x80070002 - JavaScript runtime error: The system cannot find the file specified.
    Exception was thrown at line 21846, column 3 in ms-appx-web://au.com.hymans.mobileedc/www/javascript/a5.js
    0x800a138f - JavaScript runtime error: Unable to get property 'toUpperCase' of undefined or null reference
    Exception was thrown at line 210, column 78 in https://maps.googleapis.com/maps/api...ck=A5.map.init
    0x800a139e - JavaScript runtime error: [object Object]
    Exception was thrown at line 210, column 78 in https://maps.googleapis.com/maps/api...ck=A5.map.init
    0x800a139e - JavaScript runtime error: [object Object]

    I tried all the various options in "Project Properties" under "JavaScript Libraries" but made no difference.

    Not sure where to go from here?

    Greg

  13. #13
    Member
    Real Name
    Greg Carmody
    Join Date
    Apr 2017
    Location
    Sydney Australia
    Posts
    210

    Default Re: Mobile app and Surface Pro

    Davidk,

    I found that if you include the line:

    <preference name="windows-target-version" value="10.0" />

    in your config.xml file, you will get the Digital Signatures tab in the properties of your appx file.

    Cheers,
    Greg

  14. #14
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    7,623

    Default Re: Mobile app and Surface Pro

    Thanks Greg... I'll give that a try and report back.

Similar Threads

  1. On Screen Keyboard Capabilities with Surface Pro using V10/11
    By jbk in forum Alpha Five Version 11 - Desktop Applications
    Replies: 0
    Last Post: 01-26-2018, 08:28 AM
  2. Desktop App using the camera in a Surface Tablet
    By Finian Lennon in forum Windows Desktop Applications
    Replies: 7
    Last Post: 05-01-2017, 12:26 AM
  3. Microsoft Surface
    By PhotoHog in forum General Questions
    Replies: 4
    Last Post: 10-19-2016, 12:39 AM
  4. launching MS surface camera
    By gkeramidas in forum Windows Desktop Applications
    Replies: 0
    Last Post: 12-28-2015, 05:40 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
  •