Picture of HannesN
Registered 5 years 31 days
HannesN Wednesday, 20 May 2020, 09:10 AM
A "Hello World" App
Dear Innovaphone,

I'm in the process of developing our first app. I have set up a test environment/sandbox with both an IPVA pbx and app platform in virtual machines. I used the app template to develop an app called call_info, however I'm stuck as follow:

1. My boss first want a "Hello World" app, and so I updated/changed the call_info.js file to include "that.addHTML("<font size='+75%'>Hello World!</font>")" without the counter, however, he is not happy that the app still connects to a database. He wants an app that only do one thing and that is shows "Hello World" without even connecting or creating any databases or do anything else but that,

2. then, secondly, he wants to then first upload this "Hello World" app to the live environment, which is an IP811, and sees if it works, before I go on developing the call_info app. I've done a thorough search but could find no instructions how to upload an app, respectively what or how of the app should be uploaded, since he wants it externally uploaded out of the admin console in Firefox/chrome.

For you it might be clear that I'm a newbie. I'm willing to construct the app from scratch as well, but for that I need more in depth information of how the app is constructed that I could not figure out in the documentation.

Thanks in advance.

Hannes
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Wednesday, 20 May 2020, 09:34 AM
1 of 1 users consider this post helpful
Re: A "Hello World" App
Hi Hannes,

1. If you upload an App through the Visual Studio plugin, the plugin itself tells the AP Manager to create an App Service and an App Instance. The AP Manager always creates a database for your App Instance, so this is out of your scope. But inside your appname.cpp, you can skip the database connect if you want to work without a database (do not call this->database->Connect ).
Of course you then need to change the logic of the async task flow and you need to do what is done inside ConfigInitComplete at once (because you skip the database and config library initialization).

2. On a live system, the developer mode is not enabled inside the AP Manager and you can't manually upload an App. If you still want to do so, open the AP Manager and its settings and enable the developer mode there (see the screenshot). No need to disable the app security in this case though (this is just needed if developing with VS).

Greetings,
Daniel
app_developer_mode.png

Picture of HannesN
Registered 5 years 31 days
HannesN Monday, 25 May 2020, 08:43 AM
Re: A "Hello World" App
Good morning Daniel, Thank you for your answer. I have 2 more questions that should not take too much of your time:

1. In the App Platform Admin UI in the listing of the Installed apps, how does one set the Manufacturer for our own app? Thus in our case SHIFT?

2. Then when one goes into the respective apps next to the Log file: next to Backtraces the 0-3, respectively between brackets, I assume indicate differently log files, how does one use these different log files, and thus how does one activate them respectively?

Thanks so much for your help. I don't find this in the tutorials and/or other documentation.

Have a great start in the week.

Yours,

Hannes
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Monday, 25 May 2020, 09:01 AM
1 of 1 users consider this post helpful
Re: A "Hello World" App
Hi Hannes,

1. If your App is installed through the App Store, your App will get a manufacturer, which is written inside the JSON file from the App Store (you can already play around with the App Store App and setup an own App Store, upload your App there from an HTTP server and define a manufacturer name). The official deployment on our innovaphone App Store is currently in development.

2. The (0) to (3) log files are created if your App crashes and contain the logs of your App until the crash happened and the corresponding backtraces of the crash itself. Like this you can investigate the last four crashes.

Greetings,
Daniel
Picture of HannesN
Registered 5 years 31 days
HannesN Monday, 25 May 2020, 10:40 AM
Re: A "Hello World" App
Hi Daniel,

Thanks again.

I have an issue with the websocket between the myApps client and the PBX-AppPlatorm, instead of AppWebsocket(018ec5e0)::AppWebsocketRecv I get AppWebsocket(018ec5e0)::Error.

In short, I only deploy the template (thus the counter app although it is also the case with my Hello World app). My problem is in the App admin, both on the PBX and the App Platform, it works, but in the myApps app with every user I have tried it doesn't work. In the log it gives the above error.

Thanks for your effort.

Greetings,

Hannes
Picture of HannesN
Registered 5 years 31 days
HannesN Monday, 25 May 2020, 11:17 AM in response to Daniel Deterding (innovaphone)
Re: A "Hello World" App
Sorry Daniel, I got interrupted and then the time to add and change was over. Here is my issue again:

Hi Daniel,

Thanks again.

I have an issue with the websocket between the myApps client and the PBX-AppPlatorm, instead of AppWebsocket(018ec5e0)::AppWebsocketRecv I get AppWebsocket(018ec5e0)::Error.

In short, I only deploy the template (thus the counter app although it is also the case with my Hello World app). My problem is in the App admin, both on the PBX and the App Platform, it works, but in the myApps app with every user I have tried it doesn't work. I only get a blank screen.

This is the log for the call from the myApp:
05-25 09:11:11.731 call_info@shift.dev.com AppWebsocket(018ec5e0)::AppWebsocket 
05-25 09:11:11.732 call_info@shift.dev.com AppWebsocket(018ec5e0)::AppWebsocketRecv 
05-25 09:11:11.732 call_info@shift.dev.com AppWebsocket(018ec5e0)::WebsocketSendResult() connected=0 sendCount=0 
05-25 09:11:11.733 call_info@shift.dev.com AppWebsocket(018ec5e0)::Error 
05-25 09:11:11.733 call_info@shift.dev.com AppWebsocket(018ec5e0)::WebsocketSendResult() connected=0 sendCount=0 
05-25 09:11:11.734 call_info@shift.dev.com AppWebsocket(018ec5e0)::AppWebsocketClosed 
05-25 09:11:11.734 call_info@shift.dev.com AppWebsocket(018ec5e0)::~AppWebsocket 
Greetings,

Hannes
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Monday, 25 May 2020, 11:43 AM
1 of 1 users consider this post helpful
Re: A "Hello World" App
Hi Hannes,

the Error method is invoked, if the authentication doesn't match or something else, but here I would suspect authentication.

How did you create the PBX App object for the Admin App? Which password did you use inside the PBX App object?

The password used inside the PBX App object must match the instance password of your app inside the AP Manager. The default instance password from the template app if you deploy it through VS is pwd

So if you set this password manually inside the PBX App object of the admin app and for the instance inside the AP Manager (click on the App Service in the left list and on the App Instance in the right list and then the Edit button at the top), it should work.

Greetings,
Daniel
Picture of HannesN
Registered 5 years 31 days
HannesN Tuesday, 2 June 2020, 09:29 AM
Re: A "Hello World" App
Good morning Daniel,

I have tried everything, leaving the default passwords as well as lining up the instance password manually with the pbx app object password, and nothing works.

What is funny is that in the browser with either the admin user as well as a normal user the Hello World shows on any machine on the network, but with exactly the same users in the myApps it doesn't show a thing.

I attach a screenshot of this in my Windows VM.

I'm looking forward to your answer.

Best regards,

Hannes
Screenshot_from_2020-06-02_09-24-04.png

Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Tuesday, 2 June 2020, 09:39 AM
Re: A "Hello World" App
Ah, so it's "just" the windows myApps client itself which doesn't work?

Can you right click on the client window and open the browser console with "Inspect"?
There you'll find the console trace of the embedded chromium. Can you attach this trace here?

Greetings,
Daniel
Picture of HannesN
Registered 5 years 31 days
HannesN Tuesday, 2 June 2020, 10:04 AM
Re: A "Hello World" App
Thanks Daniel,

I try to copy past it here, but it doesn't work, so I attach it.

The user is shift_admin.

The error in the console is:

Uncaught ReferenceError: app is not defined
at new shift.Call_Info (shift-call_info.js:31)
at shift-call_info.htm?name=call_info&title=Call_info&scheme=dark&lang=en&originalUrl=http%3A%2F%2F192.168.178.73%2Fcall_info%2Fshift-call_info:16
at start (innovaphone.lib1.js:648)
at Object.Start (innovaphone.lib1.js:271)
at onload (shift-call_info.htm?name=call_info&title=Call_info&scheme=dark&lang=en&originalUrl=http%3A%2F%2F192.168.178.73%2Fcall_info%2Fshift-call_info:16)

Hannes
myApps.txt
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Tuesday, 2 June 2020, 10:14 AM
1 of 1 users consider this post helpful
Re: A "Hello World" App
This will be reason. Somehow your code in shift-call_info.js:31 is reached with an undefined app object.

I'm not sure, what leads to this issue, but this looks as if you're instantiating some objects in javascript before everything is ready.

You can add breakpoints in the chromium debugger and see the flow inside your javascript to check, what exactly happens and what's the difference to opening the app inside the browser.

Greetings,
Daniel
Picture of HannesN
Registered 5 years 31 days
HannesN Tuesday, 2 June 2020, 10:43 AM
Re: A "Hello World" App
Daniel it seems like I got the problem, the mApps client loads an older version of shift-call_info.js. The version it should load should not have the following line commented out:

//var app = new innovaphone.appwebsocket.Connection(start.url, start.name);

it will never work without it.

Sorry for the basic question, but how do I clean the cash in the myApps client?

Hannes
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Tuesday, 2 June 2020, 10:53 AM
Re: A "Hello World" App
Hi Hannes,

right click on the myApps icon in your taskbar icons and select "Open trace folder". Delete the "appproxy" folder which you find here.
Restart myApps afterwards.

Greetings,
Daniel
Picture of HannesN
Registered 5 years 31 days
HannesN Tuesday, 2 June 2020, 11:16 AM
Re: A "Hello World" App
Thanks Daniel, now it shows Hello World in the myApps client.

However right clicking the myApps client in the task bar don't give me the "Open trace folder" option, but in the inspect under Application->Clear storage I could also clean all site data and when I loaded the app again it loaded the right version of the js file.

Greetings,

Hannes
Picture of HannesN
Registered 5 years 31 days
HannesN Monday, 8 June 2020, 08:09 AM in response to Daniel Deterding (innovaphone)
Re: A "Hello World" App
Morning Daniel,

I've got now all the issues sorted out thanks, but now I need to simulate calls in my closed sandbox environment in order to develop the app to what I'm instructed to do.

When I open a softphone both on my computer and in the myApps I installed on my phone (to call each other in my closed system) I get the message unlicensed and noway to make a call.

I can send messages between users, but not make calls. If there is a wiki page or some tutorial or instructions that can help me, I'll be very happy.

I guess I'm suppose to start a new thread with this request, in oder to help other people as well. I will gladly do that if you tell me that.

I wish you a great start in the week.

Regards,

Hannes
Picture of Daniel Deterding (innovaphone)
Moderator Registered 15 years 179 days
Daniel Deterding (innovaphone) Monday, 8 June 2020, 08:59 AM
1 of 1 users consider this post helpful
Re: A "Hello World" App
I think you need to work with the test mode while developing: http://wiki.innovaphone.com/index.php?title=Reference11r1:General/License

You also need to make sure, you have the needed license flags checked on your PBX user object (App(phone), App(softphone)).

Greetings,
Daniel
Picture of HannesN
Registered 5 years 31 days
HannesN Thursday, 18 June 2020, 08:55 AM
Re: A "Hello World" App

Dear Daniel,


I know that it is not ethically good to bypass a forum post that hasn’t been assigned yet, but I have been thrown in really deep waters with this and I need at least just a short answer.


I’m going to picture it as easy as possible, in short I need all the information of the Admin UI PBX-> Calls in my new app for all consumers of this app at all times and that also for normal users without admin rights. Here is the screenshot of all the info I need in all app consumers


When I use the phoneinfo api it only gives me the information of the two parties in their respective app instances, and not in all the apps of other users, and thus not like this screenshot.


Any suggestions will be highly appreciated.


Best regards,

Hannes
← You can define your color theme preference here