Skip to main content

How to add Digital Permit Book as an add-in

DKolu-2034
Original Poster

Hello,

I have tried multiple times, and ways to add a add-in, and once I do, I get his message, and I am trying to see who can help me to resolve this issue, for a customer.

 

We are on the marketplace, but can not get add in to work.

 

thanks

 

 

unnamed 

 

CODE:

 

{

"name": "Digital Permit Book",

"supportEmail": "dj@digitalpermitbook.com",

"version": "1.0",

"items": [

{

"url": "https://sandbox.digitalpermitbook.com/app.html",

"path": "DriveAppLink/",

"menuName": {

"en": "Digital Permit Book"

},

"icon": "https://app.digitalpermitbook.com/favicon.ico"

}

],

"key": "",

"isSigned": false,

"onStartup": true,

"onShutdown": true

}

 

where url is pointing to the html file, having this content:

 

<head>

<script>

  geotab.addin.drive = function () {

      return {

        startup: function (freshApi, freshState, initializeCallback) {

          initializeCallback();

          },   

        initialize: function (freshApi, freshState, initializeCallback) {

          console.log("initialize", foo);

          initializeCallback();

         },

        focus: function (freshApi, freshState) {

 

let nav = new window.Backbone.Router();

 

nav.navigate(window.open("https://driver.digitalpermitbook.com/", "_system"), {trigger: true});

 

        },

        blur: function (freshApi, freshState) {

        },       

      };

    };

    </script>

  </head>

  <body>

    <div id="addin-container"></div>

  </body>

</html>

</script>

 

 

 

 

 

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

5 Replies

DKolu-2034
Original Poster

I was able to get it some how to open, but now i have a new error, it shows, add in can not be installed and also this !

 

IMG_7856 

add in code:

{

"name": "Digital Permit Book",

"supportEmail": "dj@digitalpermitbook.com",

"version": "1.0",

"items": [

{

"url": "index.html",

"path": "DriveAppLink/",

"menuName": {

"en": "Digital Permit Book"

},

"icon": "https://app.digitalpermitbook.com/favicon.ico"

}

],

"key": "",

"isSigned": false,

"onStartup": true,

"onShutdown": true

}

 

 

in index.html

 

<!DOCTYPE html>

<html>

<head>

  <title>Digital Permit Book Launcher</title>

  <script>

    // Function to open Digital Permit Book

    let openDigitalPermitBook = function() {

      // Open the Digital Permit Book app

      window.open("https://driver.digitalpermitbook.com", "_blank");

    }

 

    // Call the function when page loads

    window.onload = function() {

      openDigitalPermitBook();

    }

  </script>

</head>

<body>

  <p>Launching Digital Permit Book...</p>

  <p>If nothing happens, please <a href="https://driver.digitalpermitbook.com">click here</a>.</p>

</body>

</html>

 

 

 

 

DKolu-2034
Original Poster

now it works on android, but the issues is, I get the message. ADD in can not be installed >? can that be removed? also its not auto opening the window, user needs to click open window.

 

222333 

<!DOCTYPE html>

<html>

<head>

  <title>Digital Permit Book Launcher</title>

  <script>

    // Function to open Digital Permit Book

    let openDigitalPermitBook = function() {

      // Open the Digital Permit Book app

      window.open("https://driver.digitalpermitbook.com", "_blank");

    }

 

    // Call the function when page loads

    window.onload = function() {

      openDigitalPermitBook();

    }

  </script>

</head>

<body>

  <p>Launching Digital Permit Book...</p>

  <p>If nothing happens, please <a href="https://driver.digitalpermitbook.com">click here</a>.</p>

</body>

</html>

Hi @DKolu-2034​ !

 

I'm really sorry for all of the frustration this must be causing. Reaching out to our SDK Team to see if they know what might be causing this and how to get it fixed fast. I'll follow up as soon as I hear back.

 

In the meantime, please share anything else that has happened to ensure we have complete context?

 

Talk soon,

Gen

DKolu-2034
Original Poster

THANK YOU !

 

SO IT WORKS, BUT I NEED TO PRESS BUTTON TO OPEN MY LINK! ( CANT GET IT TO AUTO OPEN )

 

ALSO THE RED MESSAGE ADD IN CAN NOT BE INSTALLED IS STILL THERE!

(THIS MIGHT NEED SOMETHING IN THE JSON FILE TO VERIFY THE APP MAYBE ?)

 

 

IMG_76F25218FFAB-1

Glad you got it working! Going to see if we can get some answers on that error message though.

 

@EishiFUN​  can you help @DKolu-2034​ ?!

Still have questions?