Unable to connect Google firebase with MIT App Inventor - firebase

I am making this alcohol detector project for my college where I have created an app using MIT app inventor for the purpose of displaying the alcohol level, status of the driver(drunk or sober) and sharing the location.
The location sharing part is working fine. The value of alcohol level and status is also changing in the firebase, according to the input. But, I cannot connect the firebase with app inventor and that's why the app is not displaying the alcohol level and status.
I have copied the URL and firebase token properly, still unable to resolve the problem.
This is the first screen which is supposed to display the parameters:
This is the firebase which I am trying to connect:

Keep this current code.
use one button and on that button click call the get firebase tag method.
and then copy all the code that you have added in the data change method and add that code to got value method also.
this will work.
or watch this one https://youtu.be/ES26E4r_uEU

Related

Flutter - Create sharable profile link

I am trying to create a Social media kind of networking Flutter app in which user can share his profile link. That link must redirect directly to user's profile if app is installed else redirect to link to download app. I am using Firebase as backend. Any resources or packages to work with?
You can use the package Share to enable the user to share their profile themselves. Its really easy to use.
If you would like to share a profile you will need to provide the navigational route to get to the profile screen, then provide the user's ID/data to get/view the desired data.
As far as getting a deep link to get the user to download the app if it is not installed, you can use firebase's dynamic link feature. You can customize what the link preview looks like and says. They have really good docs that you can follow.
You could use a Firebase dynamic link.
A dynamic link is basically a link pointing to possibly 3 resources:
Web URL
Android (Google Play) App ID
iOS (App Store) App ID
So once you configure it on Firebase (it's simple to configure), when the user access the link, Firebase will employ a decision tree to decide where to send the user.
In case the access is done on a mobile device, but if the app is not downloaded, it'll send the user to the store, and after returning from the store, will send the user to the correct path you've configured, following the link.
And on the app, you can implement the SDK to handle this link and when receiving this route request, redirect the user to the right profile they want to access.
I could go through the whole process, but I suggest you check the whole Firebase documentation:
https://firebase.google.com/docs/dynamic-links
In case you have a question on that where I can explain further, just let me know.

Why do I get downloads from the US even though my app is only available in the German Play Store?

I recently released my quiz app in the german Play Store and I get some impressions/downloads from the US which is odd since it should not be visible to the Play Store there. I am using Firebase authentication and I also see that some users authenticate but in my database they don't have an account (username, avatar etc.) which also can't be because after you login with Google you get to a page where you can choose your username and in the second you reach to this site, a user document will be automatically created, but in some cases it does not get created.
I noticed this behavior since my app was in beta testing.
Is it a normal behavior that there are some users who can see and are able to download an app that is usually only available in one country?
It can happen because google play console generates pre-launch reports for your app, so I think they use dummy accounts to login into your application. It can also happen when you submit an update to your app and it goes through a review process.

How to edit deep link parameter in Firebase Dynamic link

Is there a REST API to update the Deep link property of Firebase DynamicLink?
The Google guide only shows the process to create a short link
, but there is no mention of how to update the deeplink once created.
Edit from Cyril DD :
Using the Firebase website, it's possible to update a dynamic Link and when looking at the network tabs in the console, it calls an API https://firebasedurablelinks-pa.clients6.google.com/v1/updateDurableLink where it's possible to completely update the properties of an existing dynamic link.
But then I'm left with two problems:
I can't see to figure out a way to make this request work in Postman
I need to update a link that was generated with the https://firebasedynamiclinks.googleapis.com/v1/shortLinks API, and therefore does not appear in the list of links in the firebase console
This is an intended behavior, but is a known feature request. Short Dynamic Links created programmatically are designed to be shared peer to peer and isn't meant to be modified later on.
The only way to edit short Dynamic Links is through the Firebase console since short links created through the console are likely to be used in campaigns.
If you have more inputs regarding this function, you can file it as a feature request here https://firebase.google.com/support

Google Oauth client was deleted. can I restore a new one?

We running a wordpress website use google oauth for third-party social login. (via WP Social Login plugin.) Former engineer is leave, and we cannot have past google account credential.
We face a problem shows:
Error 401
Error: deleted_client
The OAuth client was deleted.
but we can only see old client id and secret from website admin panel.
I wanna to know,
if we set up a new google oauth application id/secret, will it make user crash from login website?
Or, is it possible for us to restore/retrieve former application ownership and make it live again?
This happened to me when I was working on an Add-On (maybe not completely related to this question but similar). I mistakenly deleted a Client ID that I thought we weren't using.
How I solved it:
Created a new project in Google Cloud
Associated the Apps Script project (Add-on) to this new Google Cloud project
Then I re-associated the App Script project with my previous Google Cloud project
The previous step will re-compile, create and associate the Client ID to the App Script project. It will contain all settings from the Client ID manually created and associated with your project in the code.
Maybe this will give some light to anyone having a similar problem.
Here use this link:
https://support.google.com/cloud/answer/6251787?hl=en
You have to reach google and they will help you out, this is the only solution you can do.
In my case, the simplest/only path (though certainly not ideal) ended up being to create a new Firebase project and start using that.
This of course can be problematic if you have a lot of data to move and/or a nontrivial data schema - say, with nested collections. For me, it was worth the effort to get unblocked from Sign-In suddenly failing to work.
... ah, OAuth fun
=======
If you are trying to make the new Client ID work .. though it's not a total solution, but after searching for a while, found this config option in Firebase console - where you enable Google Sign In.
So if you generate a new OAuth Client ID, update the ID & secret there.
After I did this, it went from a 401 error to a 400 mis_direct , which I think was step in the right direction.

Unable to find Subscription Key for Microsoft Cognitive Services

I need to work on Microsoft Cognitive Services (Face API). I downloaded the code from https://github.com/Microsoft/Cognitive-face-android. Now I am unable to generate the Subscription Key for it.
No matter whatever I do I get stuck in this page
From where else I can find the Subscription Key.
Thanks
The interface you are using is for testing-purposes. Consequently, it is not meant to be used for more than a month.
Here's how you can generate an API key the proper way:
Newer Edit: The Azure interface has changed since this guide was written. It hasn't changed that much, so leave me a comment if this guide is broken.
The largest change I have seen is that Bing Search API can now be located directly using the "+ New" form shown in Part A/Step 3. (aka, don't search for "cognitive services")
Edit: There is now another piece of documentation half-way down entitled "Part B: Adding a Credit Card for Pay-As-You-Go via the Azure Portal." If you have not already set up your payment method on portal.azure.com, you will get stuck at Part A/step 5.
process.
Part A:
Go to https://portal.azure.com and sign in with your credentials.
(Optional) Check to make sure you have an active Pay-As-You-Go(PAYG) subscription. Click the "More services" arrow and type subscriptions into the form that appears. Click into Subscriptions and make sure you see an entry here.**
If you're sure you have an active PAYG acct, make sure you're on the dashboard and press the green "+ New" button and start to type Cognitive Services. As you finish typing it should be your only option.
Once you've clicked the "Cognitive Services APIs" suggestion you will be brought to the following page. Click the green brain.
You'll be given a description of Cognitive services and you'll see a create button at the bottom. Press that.
The "Create" pane will pop up. Fill this out. CHECK THE PIN TO DASHBOARD BOX FIRST SO YOU DON'T FORGET (Note: If you do not have an active PAYG subscription you will see an error instead of the "Create" pane on the right-side of the image below.)
When you press the green-explosion from the picture above you will see the following icon:
This is what you want. When you've completed the form from the previous picture, press "Create" below the "pin to dashboard" box.
When you've created the subscription successfully, you'll get a little message that things are validated and your service is deploying. You should be on the dashboard now and should see a little tessellating box if you pressed pin to dashboard. Soon it will be complete and vuala!You'll see something similar to the following image. Press the "keys" button on your new service.
** If you're told that "You don't have any active subscriptions," you'll need to click the white "Add+" button and create a PAYG subscription. You will need a credit-card and non-VoIP phone for this step.
Part B:
Adding a Credit Card for Pay-As-You-Go via the Azure Portal
This portion of the process is necessary if you have never used portal.azure.com before and/or don't have an active payment-subscription on it.
For this process you will need: A valid credit-card**, a non-voip telephone for human-verification, >= $3 USD for the lowest API tier.
TO AVOID POTENTIAL HEADACHES; DO NOT USE GOOGLE CHROME FOR THESE STEPS. If you are on a Windows 10 Machine use Edge in InPrivate mode as your browser. Otherwise, firefox private-browsing is a decent alternative.
Follow steps 1 & 2 from the guide above to navigate to the Subscriptions pane. Underneath the circled "+ Add" button, you should see a message telling you there are "No subscriptions in xxxxx(Default Diretory) directory." Click the "+ Add" button.
You will be taken to the URL https://account.windowsazure.com/signup?showCatalog=True, and you should see the following screen:
As the picture above indicates. Select Pay-as-you-go (PAYG) unless you want to go off-guide. You'll be brought here & will need to fill out the 3 sections. Your card won't be charged during this process.
Once you complete the 3 steps denoted in the image above, you'll be taken to a page which asks you to wait for ~4 mins while your subscription is getting ready & you'll see that fun little animation of spinning half-circles. Eventually you'll be presented with a button which is labeled "Start Managing my Services. Which will take you back to the dashboard at portal.azure.com.
From the dashboard, Find the "Subscriptions" pane again, and this time you should see something similar to the following.
You now have a payment method with which to purchase your API subscription. From here you can resume at Step 3 of Creating an API Endpoint & Accessing Your Keys aka the first half of this guide.
** Your credit-card must have a billing address located in the country which your Microsoft username/password combo was created in.
For the subscription key, you have to create the cognitive service account in azure portal. Follow the following steps:
If you have not done so already, you will need to sign up for the Face API (preview) service.
Go to the Azure Portal at http://portal.azure.com/ and sign in with your Azure account.
Click on + New.
Select the Intelligence option.
Select the Cognitive Services APIs product. This product will allow you to start a subscription for any of the cognitive services APIs (Face, Text Analytics, Computer Vision, etc.). Today we will focus on the Face API (preview) API.
Enter a Resource name for your Face API subscription. (For instance: "MyFaceAPI"). This name should not have any spaces in it.
On API type, select .
On Pricing tier, you can select a plan. You may select the Free tier for 10,000 transactions/month. This is a free plan, so it is a good way to start trying the system. Once you go to production, we recommend you consider your request volume and change the plan type accordingly.
Select a Resource Group, or create a new one if you don't have one already.
You may change other elements in the Create dialog. We should point out that the resource provider today is only supported from United States data centers. Once you are done with any selections, click Create.
Wait a few minutes for the resource to be deployed. Once it is deployed, you can go to the Keys section in the Settings blade where you will be provided a primary and secondary key to use the API. Copy the primary key, as you'll need it when creating your first model.
Hope this help.
REF:
See this image for the azure portal registration

Resources