getBuildInfo

Questions and answers on developing, deploying and using plugins and JavaBeans

getBuildInfo

Postby nic » Mon Aug 17, 2020 4:25 pm

I am using phonegap version 1.0.9 on Servoy 2020.03.1 and I am trying to get the buildinfo from the svyphonegapPhonegap plugin. Here is my code:
scopes.globals.glb_buildinfo = plugins.svyphonegapPhonegap.getBuildInfo()
I should receive an object with a large array of values, but I receive an object with an array length of 1 and the content is undefined.
Does anyone has an answer for me
nic
 
Posts: 18
Joined: Fri Nov 16, 2018 10:54 am

Re: getBuildInfo

Postby tnguyen » Mon Aug 17, 2020 5:14 pm

Hi,

Is your code is executed within the callback of the onReady event from solutionopen method?

function onSolutionOpen(arg, queryParams) {
//initialize phonegap module
scopes.phonegap.onSolutionOpen(arg,queryParams, onReadyCallback);

}

function onReadyCallback(){
//device is ready, get information from a plugin
application.output(plugins.svyphonegapPhonegap.getBuildInfo());
}
tnguyen
 
Posts: 12
Joined: Mon Sep 29, 2014 8:40 am

Re: getBuildInfo

Postby nic » Tue Aug 18, 2020 9:04 am

Yep, here's my complete code :

scopes.phonegap.onSolutionOpen(arg, queryParams, onReadyCallback);

/**
* @properties={typeid:24,uuid:"9EC15C4A-7709-4E94-9EB4-9596C77F6098"}
*/
function onReadyCallback(){
//device is ready, get information from a plugin
scopes.globals.glb_device = plugins.svyphonegapDevice.getDeviceInfo()
application.output('1 UUID=' + scopes.globals.glb_device.uuid, LOGGINGLEVEL.INFO)
scopes.globals.glb_device_uuid = plugins.svyphonegapDevice.getDeviceInfoProperty('uuid')
application.output('2 UUID=' + scopes.globals.glb_device_uuid, LOGGINGLEVEL.INFO)

scopes.globals.glb_buildinfo = plugins.svyphonegapPhonegap.getBuildInfo()
application.output('1 buildinfo=' + scopes.globals.glb_buildinfo, LOGGINGLEVEL.INFO)
application.output('2 buildinfo=' + scopes.globals.glb_buildinfo.toString(), LOGGINGLEVEL.INFO)
application.output('3 buildinfo=' + scopes.globals.glb_buildinfo.length, LOGGINGLEVEL.INFO)
application.output('4 buildinfo=' + scopes.globals.glb_buildinfo[1], LOGGINGLEVEL.INFO)
application.output('name=' + scopes.globals.glb_buildinfo.name, LOGGINGLEVEL.INFO)
application.output('version=' + scopes.globals.glb_buildinfo.version, LOGGINGLEVEL.INFO)
application.output('code=' + scopes.globals.glb_buildinfo.versionCode, LOGGINGLEVEL.INFO)

plugins.svyphonegapPhonegap.setOnBackMethod(onBackMethod)

plugins.svyphonegapPhonegap.setOnPauseMethod(onPauseMethod)

plugins.svyphonegapPhonegap.setOnResumeMethod(onResumeMethod)
}

I get an object with an array of 1, but content is undefined

Nic
nic
 
Posts: 18
Joined: Fri Nov 16, 2018 10:54 am

Re: getBuildInfo

Postby tnguyen » Tue Aug 18, 2020 4:55 pm

Which device(s) are you testing on?
How are you creating the .apk or .ipa?
Are you using the following link to create the template?
https://phonegaputils.servoy.com/soluti ... index.html
tnguyen
 
Posts: 12
Joined: Mon Sep 29, 2014 8:40 am

Re: getBuildInfo

Postby nic » Wed Aug 19, 2020 11:45 am

I am testing on a Samsung S7 Android device. I created the config.xml with the Servoy utility.
nic
 
Posts: 18
Joined: Fri Nov 16, 2018 10:54 am

Re: getBuildInfo

Postby tnguyen » Wed Aug 19, 2020 5:48 pm

Can you send me a private message with the config.xml used?


Also, do any of the other phonegap functions work? Such as the back button or other native integrations ?

I would like to review that item over.
tnguyen
 
Posts: 12
Joined: Mon Sep 29, 2014 8:40 am


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 5 guests