Alexa SDK returns null time zone - alexa-skills-kit

I'm trying to obtain the device time zone via the Alexa settings API. I'm doing this in the Alexa Developer Console simulator, but the docs say this is OK:
if you attempt to query the Alexa Settings API by using the deviceId and apiAccessToken values generated by the Alexa simulator, you can only retrieve the time zone value.
That's all I'm looking for. I'm using this code (Java SDK):
String deviceId = input.getRequestEnvelope().getContext().getSystem().getDevice().getDeviceId();
String timeZone = input.getServiceClientFactory.getUpsService().getSystemTimeZone(deviceId);
It successfully gets the device ID (I print this in the card text), but time zone is null. No exceptions are thrown.
I enabled personalization in the simulator and granted permissions for location services and full address. Still null.
Is my code wrong? Configuration? Or are the docs incorrect?

Related

Informatica Admin Console - Clear Started By field when reviewing execution statistics

I am using Informatica Developer 10.2. When I run a mapping or workflow, I often monitor it from the administrator console.
However, the mappings/workflows are run by a service account (not my own profile); and the admin console defaults to having my user id in the Started By field. This means I have to constantly clear this field.
Is there a means to default this to be empty?
Thanks

Sending Google Analytics Events via API: How to get app_instance_id or client_id from Firebase SDK from web client?

How to get app_instance_id or client_id from Firebase SDK from web client (not gtag.js)?
reference: https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=firebase
I used firebase/installations
const installationId = await installations.getId(
installations.getInstallations()
);
but when validating a request with such installationId at ga4 api I get:
description: "Measurement app_instance_id is expected to be a 32 digit hexadecimal number but was [22] digits."
fieldPath: "app_instance_id"
validationCode: "VALUE_INVALID"
If I understand your question correctly, you are searching for app_instance_id or client_id from Firebase SDK.
The easiest option is to allow streaming into your BigQuery tables in Firebase integrations. And then find your app_instance_id or client_id in BigQuery intra day tables.
In BigQuery you will it under these columns:
app_instance_id = user_pseudo_id
client_id = user_id
Another option is set up a proxy - like Charles or mitm and get real log from your application. Then you can easily grep it.
Another option #2 is to install adb. And use logcat to explore the log with connected device to your PC (preferably Android device. I don't have experience with iOS device)
I hope that helps.

How to connect fitbit sdk to firestore database?

I'm trying to set up an app using the Fitbit SDK, which I want to use to pull data down from my firestore database to the companion app in the fitbit application. However I am encountering an issue. The code is returning the following errors:
[15:29:50] Companion: Uncaught (in promise) TypeError: Cannot read property 'getEntriesByType' of undefined
new dn at node_modules/#firebase/webchannel-wrapper/dist/index.js:66,585
new Gn at node_modules/#firebase/webchannel-wrapper/dist/index.js:82,64
new gr at node_modules/#firebase/webchannel-wrapper/dist/index.js:95,30
pr.g at node_modules/#firebase/webchannel-wrapper/dist/index.js:94,385
Ao.ho at node_modules/#firebase/firestore/dist/index.esm2017.js:12548,19
Oo.Ko at node_modules/#firebase/firestore/dist/index.esm2017.js:13025,9
Oo.Uo at node_modules/#firebase/firestore/dist/index.esm2017.js:12978,23
? at node_modules/#firebase/firestore/dist/index.esm2017.js:12968,13
[15:30:00] Companion: [2022-08-04T14:30:00.245Z]
#elixr firebase
/firestore: Firestore (9.9.1): Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.
This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend. (node_modules/#firebase/logger/dist/esm/index.esm2017.js:78,9).
Which I can't seem to find a fix for online. The added complexity is with the environment for developing the code for this app is somewhere between node.js and web 9, so when looking at the docs on the website I have to use a mixture of the two guides to try figure out how to get it to work. The additional awkard part about this is that firestore doesn't enable app check for something that's neither iOS, Android or Web, while this could technically pass as a web app, I would need to somehow register a website just to get the recaptcha key from to then enable app check. But would have no way to verify the user each time using app check.
Is this even possible to do, as there's no docs on either end of fitbit or firebase to help in this sort of situation. I had though of potentially using direct websockets but don't know the restrictions on that kind of data transfer.
Does anyone know a work around/ how to remedy this?

StackDriver Error Reporting Email Notification

In our multitenant environment, I would like to setup an alert notification(e.g. email) when our user's code has an exception.
I was thinking of using the stackdriver error reporting api to send an error notification. Something like
from google.cloud import error_reporting
client = error_reporting.Client()
try:
raise NameError
except Exception:
client.report_exception()
How can I set this up (using a python api)
create an alert for a tenant id/service id to send notifications to. I could input user's contact email in this step.
Report an exception for a tenant id/service id using something like client.report_exception() and notify the alert mechanism
Other solutions:
This post suggests that I use logging and log errors, create a filter and create an alert policy. That would be an option but I feel it may be expensive as that would mean for each of the services of our users, it will be running the log search query every few seconds/minutes? I was wondering if there was a push approach (vs the logging pull approach) or have I misunderstood that the logging notification is actually a push approach?
If I'm on the wrong path, please feel free to suggest better ways.

userID in getUserNotificationSubscription WORKLIGHT Pushnotification

I am implementing push notification in my IBM worklight project. Sample code in developerworks do it with some authentication challenger mechanism to do the subscription. I somehow used the same Authentication challenge to do the subscription (although my app design doesn't need to do this). In the sample code actual trigger of notification call is not written.
I found out from web resource that WL.Server.getUserNotificationSubscription(eventSourceName, userId) need to be used to get the subscribed user details. However I don't know how to get userId details here? Please let me know what is userId here and how to get its value.
Here is information regarding WL.Server.getUserNotificationSubscripion:
getUserNotificationSubscription:
getUserNotificationSubscription(eventSource, userId) Returns a
subscription object for a user. Returns a subscription object for the
user with the specified ID to the specified event source.
Parameters:
eventSource - Mandatory. A string containing the name of the event source.
userId - Mandatory. A string containing the user ID, created during the login process. The user ID can be obtained by calling
WL.Server.getActiveUser.
Returns:
The method returns a subscription object that contains the user ID and the mutable subscription state.
Example: {userId: 'bjones', state: {numCoupons: 3}}
Note:
All subscription object fields are read-only, except for the user subscription state. You can modify the user subscription state in your
JavaScript code, and then must use the save method to save it to the
IBM® Worklight® database.
As you can see the userId is the specific user that was created during the login and authentication process. Worklight provides a server side API WL.Server.getActiveUser() which allows you to retrieve the current user.
In regards to your other statement saying "in the sample code actual trigger of notification call is not written. " Worklight actually provides a jar file inside of the sample project that allows you to trigger the notification. Here is some more information for this backend emulation:
Let me know if you have any further questions.

Resources