Visual Builder

Get Involved. Join the Conversation.

Posts

  • Stiven Oliveira Bezerra
    Action Take Picture
    Topic posted December 2, 2019 by Stiven Oliveira BezerraBlue Ribbon: 750+ Points, tagged Action Flows, Mobile, Style, UI 
    Title:
    Action Take Picture
    Content:

    Hi, 

    I'm using the Action to Take a Photo, but when i use the mobile, i just want take a photo with camera, i don't want browse on gallery the photo. Its possible deactivate the browse on gallery photo?

     

    Thanks

  • Stiven Oliveira Bezerra
    Offline Post VBCS with Business Object115.0
    Topic posted November 25, 2019 by Stiven Oliveira BezerraBlue Ribbon: 750+ Points, tagged Business Objects, JET, Mobile, REST 
    Title:
    Offline Post VBCS with Business Object
    Content:

    Hi i need to do a Get and Post with offline service, i follow some steps for this post here, https://blogs.oracle.com/shay/adding-offline-capabilities-to-an-oracle-visual-builder-app. But my Post doesn't work, and i'm try to do this for Mobile VBCS. This my code: 

    define([
        'vbsw/helpers/serviceWorkerHelpers',
        'persist/persistenceManager',
        'persist/defaultResponseProxy',
        'persist/persistenceUtils',
        'persist/fetchStrategies',
        'persist/impl/logger'
      ],
      function(ServiceWorkerHelpers, PersistenceManager, DefaultResponseProxy,
        PersistenceUtils, FetchStrategies, Logger) {
        'use strict';

        function AppModule() {}

        function OfflineHandler() {

          Logger.option('level', Logger.LEVEL_LOG);
          Logger.option('writer', console);

          var options = {

            requestHandlerOverride: {
              handlePost: handlePost
            },
            fetchStrategy: FetchStrategies.getCacheIfOfflineStrategy({
              backgroundFetch: 'disabled'
            })
          };
          this._responseProxy = DefaultResponseProxy.getResponseProxy(options);
        }

        OfflineHandler.prototype.handleRequest = function(request, scope) {

          console.log('OfflineHandler.handleRequest() url = ' + request.url +
            ' cache = ' + request.cache +
            ' mode = ' + request.mode);

          if (request.url.match(
              'https://devpoc-timtoa.integration.ocp.oraclecloud.com:443/ic/builder/design/yb/1.2.1/resources/data/ServiceOrderLineReview'
            )) {

            return this._responseProxy.processRequest(request);
          }
          return PersistenceManager.browserFetch(request);
        };

        OfflineHandler.prototype.beforeSyncRequestListener = function(event) {
          return Promise.resolve();
        };
        OfflineHandler.prototype.afterSyncRequestListener = function(event) {
          return Promise.resolve();
        };
        AppModule.prototype.createOfflineHandler = function() {
          return Promise.resolve(new OfflineHandler());
        };
        AppModule.prototype.isOnline = function() {
          return ServiceWorkerHelpers.isOnline();
        };
        AppModule.prototype.forceOffline = function(flag) {
          return ServiceWorkerHelpers.forceOffline(flag).then(function() {
        
            if (!flag) {
              return ServiceWorkerHelpers.syncOfflineData();
            }
            return Promise.resolve();

          }).catch(function(error) {
            console.error(error);
          });
        };
        AppModule.prototype.dataSynch = function() {
          return ServiceWorkerHelpers.syncOfflineData();
        };

        // custom implementation to handle the POST request
        var handlePost = function(request) {
          if (ServiceWorkerHelpers.isOnline()) {}

          return PersistenceUtils.requestToJSON(request).then(function(
            requestData) {
            console.log('Inside PersistenceUtils');
            console.log(requestData);
            requestData.status = 202;
            requestData.statusText = 'OK';
            requestData.headers['content-type'] = 'application/json';
            requestData.headers['x-oracle-jscpt-cache-expiration-date'] =
              '';

            // if the request contains an ETag then we have to generate a new one
            var ifMatch = requestData.headers['if-match'];
            var ifNoneMatch = requestData.headers['if-none-match'];

            if (ifMatch || ifNoneMatch) {
              var randomInt = Math.floor(Math.random() * 1000000);
              requestData.headers['etag'] = (Date.now() + randomInt).toString();
              requestData.headers['x-oracle-jscpt-etag-generated'] =
                requestData.headers['etag'];
              delete requestData.headers['if-match'];
              delete requestData.headers['if-none-match'];
            }
            return PersistenceUtils.responseFromJSON(requestData);
          });
        };

        AppModule.prototype.hideSpinner = function() {
          // tear down the spinner screen
          var spinner = document.getElementById('vb-spinner');
          if (spinner) {
            // if the spinner screen is not yet displayed, immediately remove it and return
            var computedStyle = window.getComputedStyle(spinner);
            var opacity = parseInt(computedStyle.getPropertyValue('opacity'),
              10);
            if (opacity < 0.1) {
              spinner.parentNode.removeChild(spinner);
              return;
            }

            var transEndFn = function() {
              if (spinner.parentNode) {
                spinner.parentNode.removeChild(spinner);
              }
              spinner.removeEventListener('transitionend', transEndFn);
            };
            spinner.addEventListener('transitionend', transEndFn, false);
            spinner.className += ' vb-spinner-reveal-trans';
          }
        };

        return AppModule;
      });

     

    Have something wrong? I need more things to work in Mobile? I'm using the Business Object.

  • Pawan Gupta
    VBCS mobile app, embedding oracle digital assistant cloud...1
    Topic posted October 11, 2019 by Pawan GuptaBlue Ribbon: 750+ Points, tagged JET, Mobile, UI, Web 
    Title:
    VBCS mobile app, embedding oracle digital assistant cloud skills
    Summary:
    VBCS mobile app, embedding oracle digital assistant cloud skills
    Content:
    Any guidance, reference or documentation to do following. Create mobile or pwa app in vbcs Embed web channel javascript sdk based oda skills Appreciate your help.
  • Guy Lior
    List Pagination with custom REST endpointAnswered4
    Topic posted September 24, 2019 by Guy LiorBronze Medal: 1,250+ Points, tagged Custom Code, Database, Mobile, REST, Services 
    Title:
    List Pagination with custom REST endpoint
    Summary:
    List Pagination with custom REST endpoint
    Content:

    Hi,

    I have custom REST API that support limit and offset parameters for pagination.

    How to implement list pagination with SDP and custom REST endpoint using the transform javascript function?

    Do I have to implement also list scrolling event ?

    Any working example or document?

    Thanks

  • Ashish Solanki
    How to get mobile device IMEI number using VBCS/ Java script15.0
    Topic posted September 10, 2019 by Ashish SolankiRed Ribbon: 250+ Points, tagged Custom Code, JET, Mobile 
    Title:
    How to get mobile device IMEI number using VBCS/ Java script
    Summary:
    How to get mobile device IMEI number using VBCS/ Java script
    Content:

    Hi All,

      We have requirement to get mobile IMEI number in VBCS mobile app.

       Is it possible to get Mobile device IMEI number using VBCS / Java Script.

    With Regards,

    Ashish Solanki

     

    With Regards,
    Ashish Solanki

     

  • Sunil Kumar
    VBCS integration with Here Map or any other map except...
    Topic posted September 9, 2019 by Sunil KumarRed Ribbon: 250+ Points, tagged Custom Code, Mobile, UI 
    Title:
    VBCS integration with Here Map or any other map except google for mobile app
    Summary:
    VBCS integration with Here Map or any other map except google for mobile app
    Content:

    Since Google Api is no longer free (we have to provide credit card information than only we will get some credit)

    I was trying to integrate other maps (HERE MAP, MAPBOX, LEAFLET, OPENSTREET MAP) with VBCS for mobile device. One Issue I am facing with all of them is they are working fine in preview mode. But on mobile device they are just not displaying the Maps. Some time giving error for blob not found, sometime no error but not displaying anything.

     

    Has anyone integrated VBCS with other Maps for Mobile device? 

     

    Thanks in Advance.

     

    Regards

    Sunil

    Version:
    19.1.3
  • Duha S
    Adding oj component to VBCS1
    Topic posted September 1, 2019 by Duha SRed Ribbon: 250+ Points, tagged JET, Mobile, Style, UI 
    Title:
    Adding oj component to VBCS
    Content:

    Hi,

     

    Can you please guide me to to have the same autocomplete feature that shows in the video whenever I try to add an oj component?

    https://www.youtube.com/watch?v=D24MCYjCNik

     

    Regards,

     

    DSO

  • Sunil Kumar
    VBCS QR CODE SCAN APP NOT WORKING using TakePhoto & jsQR3
    Topic posted August 26, 2019 by Sunil KumarRed Ribbon: 250+ Points, tagged Action Flows, Custom Code, JET, Layout, Mobile, Tip, UI, Web 
    Title:
    VBCS QR CODE SCAN APP NOT WORKING using TakePhoto & jsQR
    Summary:
    VBCS QR CODE SCAN APP NOT WORKING using TakePhoto & jsQR
    Content:

    Hi All,

    I am trying to build a simple mobile app to scan QR code , I have gone through some links & found about Take Photo feature of VBCS & jsQR lib. I tried to use them to build the app but some how not able to scan. Please find below the issue I am facing

    1. Firstly TakePhoto returns a blob (https://docs.oracle.com/en/cloud/paas/integration-cloud/visual-developer/takephoto-action.html) , but jsQR  expects a imageData object (refer here -- https://github.com/cozmo/jsQR)  ==> I tried to convert blob to base64 & base64 to imageData object using canvas but below code is returning null

    const code = jsQR(imageData, width, height, options?);
    

    console.log(code) // this is out put to null

     

    If any one has done this can you please share the correct approach/code please.

    Thanks in advance

     

    Regards

    Sunil

     

     

     

    Version:
    VBCS 19.1.3
    Code Snippet:
  • Duha S
    Interactive Calendar3
    Topic posted August 5, 2019 by Duha SRed Ribbon: 250+ Points, tagged Composite Component, Mobile, Tip, UI 
    Title:
    Interactive Calendar
    Content:

    Hi,

    I am trying to add a calendar to my App with actions. The idea is I want to imitate the iPhone calendar behaviour so I can pass the date to the next screen to add an event. Is there any good resource for that?

    Regards,

    Duha

  • Janani Kannan
    QR code scanner in VBCS1
    Topic posted July 3, 2019 by Janani Kannan, tagged Action Flows, Custom Code, JET, Mobile, Process, REST, Stage / Publish / DevOps 
    Title:
    QR code scanner in VBCS
    Summary:
    QR code scanner in VBCS
    Content:

    Hi,

    I would like to implement QR Code Scanner in oracle VBCS Mobile Application.  I have tried implementing take photo action using camera but i don't know how to add JS code. 

    I checked the the below reference URL.

    https://cloudcustomerconnect.oracle.com/posts/dc56dd0405

    Here there is a JS library called jsQR, from where i can import this JS library.

    Kindly anyone help me to implement QR Code scanner in Oracle VBCS.

    Thanks in advance,

    Regards,

    Janani