Without users' permission for communications, will a sideloaded app have the ability to make web requests?

Hi, let me describe my situation. I am adding a feature for my app that is in the ciq store already to enable users pay on the watch. Each time the users need to make a web request at first.

Previously, my app didn't have the Communications permission. Now I wanna test on a real device after some successful simulator tests. But I don't have a trial app in which case sideloading helps. When I sideloaded my app, it would show -2 after a web request. I looked up in the apidoc, -2 means BLE_HOST_TIMEOUT. What does it really mean? If it was caused by my https interface latency,or the absence of Communications permission. It seems to be the latter one. Did you encounter the similar issue?

Yesterday I released a new version. But I saw 0 on one user's watch and most time -2 was thrown.  no idea about what happened. When checking the log of my server, I found the request was received already. How to debug this make image request issue? Do you have any idea?

I have seen sth JIM_M_58 posted last year like below.

Another thing is with the current Android, images processing is no longer done on the phone but on a garmin server.

Thins bug report gets into some of the image processing stuff:

https://forums.garmin.com/developer/connect-iq/i/bug-reports/connect-mobile-4-40-makeimagerequest-localhost-error

So

my question is . In China, where is the server for processing the makeimagerequest image processing? My server is in China, will it caused by the network latency from garmin server to mine?

  • Do you have any idea? I am sure the request was sent to my server and I have seen logs in my server log. I don't know whether it is sdk bug or my fault.

    function pay(appName, deviceIdentifier, timestamp) {
      Storage.setValue("tr" /**task_running**/, true);
    
      var parameters = {
        "id" => deviceIdentifier,
        "width" => 100,
        "appName" => appName,
        "timestamp" => timestamp
      };
    
      var options = { // set the options
        :maxWidth => 100, // set the max width
        :maxHeight => 100, // set the max height
        :dithering => Communications.IMAGE_DITHERING_NONE // set the dithering
      };
    
      // Make the image request
      Communications.makeImageRequest(PAY_URL, parameters, options, method(:responseCallback));
    }
    Former Member
  • Hi all, I found the culprit. If you are using any server program to return a dynamic image for user's watch. Remember to tell the response stream that you are going to return an image. For me, I use a java server program to support the image generation.  

    I forgot to add this line 

    response.setContentType(ContentType.IMAGE_JPEG.getMimeType());

    So an error occurred when the watch was receiving pictures.
  • where is the server for processing the makeimagerequest image processing

    For universal watches, https://api.gcs.garmin.com/ 

    China mainland: api.gcs.garmin.cn