I'm trying develop Google Chrome App(or extension, not sure) to use DigitalPersona fingerprint reader on Windows.
Following :
https://developer.chrome.com/apps/usb
https://github.com/GoogleChrome/chrome-app-samples/tree/master/usb
var DEVICE_INFO = {
"vendorId": 1466, //0x05BA
"productId": 10 //0x000A
};
chrome.usb.findDevices(DEVICE_INFO, call_method);
Result is "App was granted the 'usbDevices' permission, but device not found".
p.s. the usb information above was found in windows device manager.
Don't know why this happened.
Does Google Chrome not support DigitalPersona fingerprint reader?
p.s. Chrome://inspect said "No devices detected."
The content of manifest.json is the same as the example of knob, but vendorId and productId:
{
"name": "USB Spinner Sample",
"version": "0.3",
"manifest_version": 2,
"minimum_chrome_version": "23",
"app": {
"background": {
"scripts": ["background.js"]
}
},
"permissions": ["usb"],
"optional_permissions": [ {"usbDevices": [{"vendorId": 1466, "productId": 10}]}]
}
As noted on the usb-label-printer sample Chrome App:
Some Windows device drivers take ownership of the device and don't allow Chrome to connect to them. If openDevice or findDevice doesn't work for you, you can try to use a generic low level driver instead.
This theory was confirmed by chiahao, as installing a generic low-level USB driver with the Zadig tool resolved the problem.
Related
I am trying to develop a smart home action that works with local fulfillment but my device doesn't receive the UDP broadcast request. I have a google home device at home which is connected to my account.
I have made the next steps:
add otherDevicesIds field to my sync response
add device scan configuration (I have chosen UDP )
implement UDP server on the device. it listens on 8888 ports and responds to echo -n "test data" | nc -u -b 255.255.255.255 8888
Packets from my laptop are received by my DIY smart home device but I don't see any packets from the google home assistant device(it is in the same network as my laptop). It seems that google assistant does not send UDP broadcast at all.
I have added an example of my sync response and a screenshot of Device Scan Configuration for this action.
How to make my device receive UDP broadcast? Tell me if I have understood the local fulfillment wrong.
SYNC response example below
{
"payload": {
"agentUserId": "fas87df6a8s7d6f",
"devices": [
{
"otherDeviceIds": [
{
"agentId": "fasf87da",
"deviceId": "sdfta87sd6f"
}
],
"deviceInfo": {
"model": "LIGHT",
"manufacturer": "87sd6f87asd",
"swVersion": "1.0",
"hwVersion": "LIGHT"
},
"customData": {},
"id": "light-1234112",
"attributes": {},
"type": "action.devices.types.LIGHT",
"name": {
"defaultNames": [
"light"
],
"nicknames": [
"light"
],
"name": "7f6as87fa8"
},
"traits": [
"action.devices.traits.OnOff",
"action.devices.traits.Brightness"
],
"willReportState": false
}
]
},
"requestId": "7298347129347192374"
}
Below is the example of google action UDP config.
As mentioned in the comments by you, you didn’t create a local fulfillment app which is necessary for developing & testing local fulfillment for any of your existing Smart Home Actions. You can find more information about this at https://developers.google.com/assistant/smarthome/develop/local?hl=en
Additionally, make sure that you have added the devices correctly after enabling the test suite.
my app bild with Expo , i use import * as Google from "expo-google-app-auth"; for signin users from google. in development mode its work correcctly like expected.
but in standalone mode ,
its redirect me to choose email, and after i choose its redirect me to google.com home page instead of back to my app
the question: why is redirect me to google and how can i handle that (again -- in development mode its work)
my google sign in app
try {
const result = await Google.logInAsync({
androidClientId: "556835760268-jm5v5u3h1bu4rcontent.com",
androidStandaloneAppClientId: "556835760268-jm5v5u3h1bu4uea3jr788tent.com",
scopes: ["profile", "email"],
});
my app.json file:
{
"expo": {
"name": "Lior",
"slug": "Lior",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"scheme": "myapp",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "com.roei.liorApp",
"buildNumber": "1.0.0"
},
"web": {
"favicon": "./assets/favicon.png"
},
"android": {
"package": "com.roei.liorApp",
"versionCode": 1,
"config": {
"googleSignIn":{
"apiKey": "AIzaSyD4K3trmw",
"certificateHash": "89B503B4EDC94"
},
"googleMaps": {
"apiKey": "AM35K3trmw"
}
}
I suspect the problem is just not specifying redirect URI information.
In general, your authenticator (Google in this case) needs to know where to send the user (i.e. what URL) after it's done authenticating. In my case, I use AuthSession and have to specify a redirectUri which is generated by AuthSession that will ultimately provide a return-path linked back into the app so it can automagically handle resuming App logic after login.
If the authenticator (Google) doesn't know where to send the user to after login, it doesn't seem unreasonable that it would just redirect you somewhere it considers safe (i.e. google's site).
As for the inconsistency with development mode, it's likely that some reasonable defaults are being made which aren't/can't/shouldn't in global mode for safety reasons. There's text on both AuthSession and Expo Google docs that speak to that type of inconsistency being expected. For example, here
Note on redirectUrl: If you choose to provide your own redirectUrl, it
should start with the value returned by AppAuth.OAuthRedirect. This
way, the method will function correctly and consistently whether you
are testing in Expo Go or as a standalone app.
Also, if you haven't already, be sure to review and implement the specific instructions for Deploying to a standalone app on Android
Finally, consider switching to AuthSession because the previous answerer was correct in pointing out that it's marked as deprecated currently. You can see the giant deprecated banner at the top the doc pages as referred in this answer. If you have to get something working, might as well get it working with the latest supported version.
If you DO use AuthSession, check out this section containing the following references to how to generate a redirect URI
"AuthSession.makeRedirectUri() Create a redirect url for the current
platform and environment. You need to manually define the redirect
that will be used in a bare workflow React Native app, or an Expo
standalone app, this is because it cannot be inferred automatically."
Note, when you set up the redirectUri feature, however you set it, you will need to also whitelist the URI on google side. That's because the authenticator (Google) needs to know that the URI pattern its being asked to hand over the credentials to is trustworthy. That way if someone tries to pretend to be you and get them to send your users' credentials to a non-trusted URL, Google won't do it.
My fixtures are set up like so
{
"fixtures": [
{
"name": "login",
"pageUrl": "http:\/\/localhost:3000\/",
"tests": [
{
"name": "type name",
"commands": [
{
"type": "type-text",
"studio": {
},
"callsite": "0",
"selector": {
"type": "js-expr",
"value": "input[type=email]"
},
"options": {
},
"text": "example#email.com"
}
]
}
]
}
]
}
with one simple test to find the input and type some text but when running the command I get
testcafe chrome login.testcafe
ERROR Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.
Type "testcafe -h" for help.
I've seen this issue a couple of times on their issues board one relating to CI integration on a Linux server and another which seems like a similar issue of trying to connect to localhost
https://github.com/DevExpress/testcafe-browser-provider-electron/issues/20
https://github.com/DevExpress/testcafe/issues/1133
New to testcafe any help would be appreciated!
I've found the solution some network policies don't allow access to your machine on some ports in my example it's 57501.
testcafe chrome login.testcafe --hostname localhost
adding --hostname resolves the issue
documentation
https://devexpress.github.io/testcafe/documentation/using-testcafe/command-line-interface.html#--hostname-name
I still don't know how to launch from the IDE but this resolves my main issue.
TestCafe Studio Preview does not support setting command line options (hostname in your case). The TestCafe team is going to implement this functionality in the official release.
So, for now, it is only possible to run tests via a command line.
UPDATE:
You can set the hostname option in the TestCafe Studio Settings dialog:
How can I access the complete avContent API service in a Sony ActionCam AS-200V when operating the camera in WiFi mode? This avContent API responds to "getMethodTypes" with only the following methods when the camera is operating in WiFi mode. When operating the camera in direct attached mode this API shows all of its methods.
Results in WiFi mode:
{
"results": [
[
"getMethodTypes",
[
"string"
],
[
"string",
"string*",
"string*",
"string"
],
"1.0"
],
[
"getVersions",
[],
[
"string*"
],
"1.0"
]
],
"id": 1
}
The HDR-AS200 supports single connection and multi connection as the way to connect to the other device for end-users, but for Camera Remote API beta, we only support single connection which is the one-to-one access of the camera and the other device.
So any functionality of the avContent service while in WiFi mode is not officially supported.
I am not able to test in app purchases even with Amazon Appstore SDK Tester.
public void onPurchaseResponse(final PurchaseResponse purchaseResponse)
purchaseResponse always has "INVALID_SKU" even if I have amazon.sdktester.json file with fake JSON.
file content:
{
"test" : {
"itemType": "CONSUMABLE",
"price": 0.99,
"title": "More Clicks!",
"description": "Click your button ten more times!",
"smallIconUrl": "http://www.google.com/images/srpr/logo3w.png"
},
"com.amazon.buttonclicker.ten_clicks" : {
"itemType": "CONSUMABLE",
"price": 0.99,
"title": "More Clicks!",
"description": "Click your button ten more times!",
"smallIconUrl": "http://www.google.com/images/srpr/logo3w.png"
},
"com.amazon.buttonclicker.blue_button" : {
"itemType": "ENTITLED",
"price": 0.99,
"title": "Blue Button",
"description": "Button Clicker - Now in Blue!",
"smallIconUrl": "http://www.google.com/images/srpr/logo3w.png"
}
}
Even sample application does not work.
Do you have any suggestions how to test application? It seems that Amazon SDK Tester does not intercept requests.
Here's how I got the In App purchases to work on Kindle Fire (after several hrs of struggle...)
adb install AmazonSDKTester.apk (Install SDKTester on Kindle Fire)
Create a file amazon.sdktester.json in the SDCARD directory (The connected KF shows up as SDCARD in Finder on ur Mac)
Contents of amazon.sdktester.json - {
"com.yourcompany.yourpkgname.200_coins" : {
"itemType": "CONSUMABLE",
"price": 0.99,
"title": "200 COINS",
"description": "2 COINS",
"smallIconUrl": "http://www.yourcompany.com/icon.png"
}
}
Press the power button on KF & press "Disconnect" button - Now KF is no longer a mounted drive on ur Mac.
Run the AmazonSDKTester app on KF.
Run your app from Eclipse. Make sure the package name in the JSON matches the In App Item SKU on Amazon's website & in the PurchasingManager.initiatePurchaseRequest("com.yourcompany.yourpkgname.200_coins");
Now you should see the In App interstitials showing up.
Still doesn't work - Force Close both your app & AmazonSDKTester on KF; Hard Reset KF ; Restart Eclipse & Restart from Step 1
Don't forget the outer enclosing {} braces in your json.
It took me 3 hours until I figured that out...
It looks like magic but hard reset resolved all my problems.
Make sure to hit the disconnect button after you connect the usb cable to your pc, otherewise the SDK tester will not be able to read the JSON file you moved over since the device is mounted at that point. Found this out the hard way.
I have faced with the issue that the same as your, the key is: in your java code, your item id must equal to your SKU in json file, in this case, it must be: com.amazon.buttonclicker.ten_clicks or com.amazon.buttonclicker.blue_button
Here is the example json file for SampleIAPConsumablesApp and SampleIAPEntitlementsApp sample project provied by Amazon:
{
"com.amazon.sample.iap.consumable.orange" : {
"itemType": "CONSUMABLE",
"price": 0.99,
"title": "More Clicks!",
"description": "Click your button ten more times!",
"smallIconUrl": "http://some/image.jpg"
},
"com.amazon.sample.iap.entitlement.level2" : {
"itemType": "ENTITLED",
"price": 0.99,
"title": "Blue Button",
"description": "Button Clicker - Now in Blue!",
"smallIconUrl": "http://some/image.jpg"
}
}
Goodluck!