1

How to upload an app into account Gurtam?

Тема: How to upload an app into account Gurtam?

Hello,
I'm developing an app with javascript and html for my account Gurtam but do not know how to upload my app and get permission from my account, because I doubt that if works just to get the token.

Can help me or suggest something, please?

2

How to upload an app into account Gurtam?

(16/09/2016 09:15:55 отредактировано spev)

Re: How to upload an app into account Gurtam?

Hello.
You should use your own server to serve your app.
Note that your app should get authToken/authHash/sid from url parameter.
You can add your app to wialon from cms manager (https://docs.wialon.com/en/hosting/cms/apps/apps) or add possibility to auth in your app through login form (example: https://sdk.wialon.com/playground/demo/app_auth_token)

Telegram: Обновления Wialon, Wialon updates
Google Chrome Extensions: Wialon Units Map | Gurtam Forum Notifications | Wialon Apps Launcher
Evgenij Spitsyn, Developer, flespi team
3

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

spev

Sorry, I should use the three parameters ( authToken/authHash/sid ) from url or only one?

Thank you for the answer.

4

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Denisse
Only one.

Telegram: Обновления Wialon, Wialon updates
Google Chrome Extensions: Wialon Units Map | Gurtam Forum Notifications | Wialon Apps Launcher
Evgenij Spitsyn, Developer, flespi team
5

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

spev

Thank you very much for the answer.

6

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi

Custom parameters as query string is possible or not in App

In my Javascript and html App i need to pass some more parameters other than the SID, AuthHash. Is it possible for me to do it.

Thanks in advance

Thanks
J Prabhu
7

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman
Yes. You can use any parameters.

Telegram: Обновления Wialon, Wialon updates
Google Chrome Extensions: Wialon Units Map | Gurtam Forum Notifications | Wialon Apps Launcher
Evgenij Spitsyn, Developer, flespi team
8

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi Spev

Thanks for the reply. Can you share in which area of the app configurator i should add my custom parameters. I have attached the app configurator screen shot.

Thanks

  • How to upload an app into account Gurtam?
Thanks
J Prabhu
9

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi

In Javascript API how to get the Custom fields of an Account using logged in users object.

I have attached the screenshot of the account custom fields

Thanks

  • How to upload an app into account Gurtam?
Thanks
J Prabhu
10

How to upload an app into account Gurtam?

(04/10/2016 16:52:32 отредактировано deal)

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, to get user's account custom fields use such request:

var accountId = wialon.core.Session.getInstance().getCurrUser().getAccountId();
wialon.core.Session.getInstance().searchItems({itemsType:"avl_resource",propName:"sys_id",propValueMask:accountId,sortType:""}, 1, 137, 0, 0, function(code, data) {
console.log(data);
});

137 - flags:
0x00000001 - base flag
0x00000008 - custom fields
0x00000080 - administrative fields

Head of Wialon Local Department
Gurtam
11

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, as for additional custom parameters - You can pass them to app.
Just set app URL in CMS Manager with Your parameters, for example:
http://my-dns.com/myapp.html?test=123&param2=ok

Head of Wialon Local Department
Gurtam
12

How to upload an app into account Gurtam?

(04/10/2016 17:12:21 отредактировано prabhu.janakiraman)

Re: How to upload an app into account Gurtam?

It is working fine Thanks so much. But only after doing the below 2 steps only i get the custom fields as per your code logic. we should first load the custom fields library then we should update the session flags to fetch the customfields properties then if we call your code it is working fine.

var session = wialon.core.Session.getInstance(); 
session.loadLibrary("itemCustomFields");
var flags = wialon.item.Item.dataFlag.base | wialon.item.Item.dataFlag.billingProps | wialon.item.Item.dataFlag.customFields;
setupPayment.session.updateDataFlags( // load items to current session
                [{ type: "type", data: "avl_resource", flags: flags, mode: 0 }], // Items specification
                function (code) {
             //here we can have your code to get the custom fields data
});
Thanks
J Prabhu
13

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, if You use updateDataFlags there is no need to make additional requests (searchItems):

var session = wialon.core.Session.getInstance(); 
session.loadLibrary("itemCustomFields");
var flags = wialon.item.Item.dataFlag.base | wialon.item.Item.dataFlag.billingProps | wialon.item.Item.dataFlag.customFields;
session.updateDataFlags( // load items to current session
                [{ type: "type", data: "avl_resource", flags: flags, mode: 0 }], // Items specification
                function (code) {
var accountId = wialon.core.Session.getInstance().getCurrUser().getAccountId();
var res = wialon.core.Session.getInstance().getItem(accountId);
var customFields = res.getCustomFields();
console.log(customFields);
});
Head of Wialon Local Department
Gurtam
14

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Thanks deal . That is a valid point.

Thanks
J Prabhu
15

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi 

I have a requirement to create a web service. There i need to create a login token using the user name and password through code. how can we achieve this?

Thanks
J Prabhu
16

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman You can use "New authorization way" to log in and generate authToken/authHash/sid.
Examples:
https://sdk.wialon.com/playground/demo/advanced_form
https://sdk.wialon.com/playground/demo/app_auth_token

Telegram: Обновления Wialon, Wialon updates
Google Chrome Extensions: Wialon Units Map | Gurtam Forum Notifications | Wialon Apps Launcher
Evgenij Spitsyn, Developer, flespi team
17

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi Spev

Thanks for the reply. I have checked those 2 urls. basically it asks for a login input. In my case i have my user name and password values as my paramters to a method from that methods i need to create a login token. without these login forms. Is there anyways available to achieve this?

Thanks
J Prabhu
18

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman
No, we don't support this authorisation method.

Telegram: Обновления Wialon, Wialon updates
Google Chrome Extensions: Wialon Units Map | Gurtam Forum Notifications | Wialon Apps Launcher
Evgenij Spitsyn, Developer, flespi team
19

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

HI

I am creating a geofence using remote api. In that remote api we have a itemId property. what value i need to pass to this propery. Also i have given my object below for your reference. I am getting error code 4.

{
  "itemId": 123****,
  "id": 0,
  "callMode": "create",
  "n": "SiteID1",
  "d": "Site Description",
  "t": 3,
  "w": 500,
  "f": 0,
  "c": 16733440,
  "tc": 0,
  "ts": 20,
  "min": 0,
  "max": 18,
  "libId": 0,
  "p": [
    {
      "x": 27.516643322771575,
      "y": 53.910699370309359,
      "r": 500
    }
  ]
}

Thanks
J Prabhu
20

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, pass in itemId parameter id of Your resource to create geofence in.

Head of Wialon Local Department
Gurtam
21

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi

How to get the unit groups from an account in remote API?

Thanks
J Prabhu
22

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, is this theme http://forum.gurtam.com/viewtopic.php?id=10253 helpful for You?

Head of Wialon Local Department
Gurtam
23

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Hi Deal

That is for Javascript API. Can you share any logic for the Remote API

Thanks
J Prabhu
24

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, using core/search_items request You can get all unit groups that current user has access to at once without getting update events:

https://hst-api.wialon.com/wialon/ajax.html?svc=core/search_items&params={"spec":{"itemsType":"avl_unit_group","propName":"sys_name","propValueMask":"*","sortType":""},"force":1,"flags":1,"from":0,"to":0}&sid=<your_sid>

To get unit groups from some certain account - just change parameters: "propName":"sys_billing_account_guid","propValueMask":"XX"
XX - account id

Head of Wialon Local Department
Gurtam
25

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Thanks Deal it is working fine.

Thanks
J Prabhu
26

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Is there any way to run the web service on Wailon's server side?

27

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

infragmt, for now we don't host any third party applications or services on Wialon servers.

Head of Wialon Local Department
Gurtam
28

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

Ho to Get all UnitGroup Names for an Unit?

I am using Wialon Remote API. I would like to get all the Unit Group Names one unit belongs to.

Can anyone please help me on this.

Thanks
J Prabhu
29

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

prabhu.janakiraman, is answered here https://forum.gurtam.com/viewtopic.php? … 62#p125962

Head of Wialon Local Department
Gurtam
30

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

I create an app to track unit and I use wialon javascript sdk (unit trace) when run app in debug mode the map appear but when run app in production mode the map does not appear. I don't know what is the problem.Please help me.

31

How to upload an app into account Gurtam?

Re: How to upload an app into account Gurtam?

heba, what do you mean by debug or production mode of application? Provide code or give more details.
You can write private message.

Head of Wialon Local Department
Gurtam