Monday, 1 March 2021

How to get sim id for incoming call (Default dailer)

When app is default dialer I need a way of getting sim id (1 or 2) for incoming call (dual sim).

App is implementing InCallService.



from How to get sim id for incoming call (Default dailer)

ebay sdk can't connect

Seem to be getting a connection error based on the trace but can't figure out why? Here is my simple script:

import ebaysdk
from ebaysdk.finding import Connection
from ebaysdk.exception import ConnectionError

api = Connection(config_file='ebay.yaml', domain='api.sandbox.ebay.com')

api_request = {
            #'keywords': u'niño',
            'keywords': u'GRAMMY Foundation®',
            'itemFilter': [
                {'name': 'Condition',
                 'value': 'Used'},
                {'name': 'LocatedIn',
                 'value': 'GB'},
            ],
            'affiliate': {'trackingId': 1},
            'sortOrder': 'CountryDescending',
        }


response = api.execute('findItemsAdvanced', api_request)

Here's the error:

Traceback (most recent call last): File "", line 1, in File "/opt/anaconda3/lib/python3.7/site-packages/ebaysdk/connection.py", line 127, in execute self.error_check() File "/opt/anaconda3/lib/python3.7/site-packages/ebaysdk/connection.py", line 223, in error_check raise ConnectionError(estr, self.response) ebaysdk.exception.ConnectionError: 'findItemsAdvanced: Accepted'

Here is my .yaml file:

name: ebay_api_config

# Trading API Sandbox - https://www.x.com/developers/ebay/products/trading-api
api.sandbox.ebay.com:
    compatability: 719
     appid: APPID
    certid: CERTID
    devid: DEVID
    token: TOKEN
    https: 1

# Trading API - https://www.x.com/developers/ebay/products/trading-api
api.ebay.com:
    compatability: 719
    appid: APPID
    certid: CERTID
    devid: DEVID
    token: TOKEN
    https: 1

# Finding API - https://www.x.com/developers/ebay/products/finding-api
svcs.ebay.com:
    appid: APPID
    version: 1.0.0
    https: 1

# Shopping API - https://www.x.com/developers/ebay/products/shopping-api
open.api.ebay.com:
    appid: APPID
    https: 1

Many thanks.



from ebay sdk can't connect

NodeJS: NOT able to set PERCY_TOKEN via package script with start-server-and-test

I have been trying really hard to set the PERCY_TOKEN on a local test run according the official guideline from percy and trigger it via yarn.

The guideline says:

$ PERCY_TOKEN=aaabbbcccdddeeefff PERCY_BRANCH=local npm test

My attempt right now looks like this:

package.json


...
"scripts": {
    "start": "react-scripts -r @cypress/instrument-cra start",
    "start:silent": "BROWSER=none yarn start",
    "start:server": "start-server-and-test start:silent http://localhost:3000",
    "build": "react-scripts build",
    "eject": "react-scripts eject",
    "envGenerateExample": "cat .env | sed 's/=.*/=/g' > .env.example",
    "jest:test": "react-scripts test --env=jest-environment-jsdom-sixteen",
    "cy:run": " 'yarn start:server './node_modules/.bin/cypress run'",
    "cy:open": "yarn start:server './node_modules/.bin/cypress open'",
    "cy:ci": "yarn start:server cy:chrome",
    "cy:chrome": "cypress run --browser chrome --record",
    "percy:exec": "yarn percy exec -- cypress run",
    "cy:percy": "yarn start:server percy:exec",
    "percy:local": "PERCY_TOKEN=$(grep 'PERCY_TOKEN.*' .env | sed 's/.*=//'); PERCY_BRANCH=local;",
    "cy:percy:local": "yarn percy:local && yarn start:server percy:exec"
  },
...
$ yarn cy:percy:local

Compiled successfully!

You can now view playground in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://192.168.1.163:3000

Note that the development build is not optimized.
To create a production build, use yarn build.

...

> playground@0.2.0 percy:exec /Users/norfeldt/Repos/playground
> yarn percy exec -- cypress run

warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ /Users/norfeldt/Repos/playground/node_modules/.bin/percy exec cypress run
 ›   Warning: Skipping visual tests. PERCY_TOKEN was not provided.
...


from NodeJS: NOT able to set PERCY_TOKEN via package script with start-server-and-test