App Link is not working for Android instant app - android

I have updated my current play store app with the Instant app appLink feature. But the link is still not working after waited for 4 days.
I have created link with below steps.
Tools -> App Links Assistants
Followed all the steps and Verify that link in android studio.
It verified successfully.
I have added a dependency in app-level Gradle: implementation "com.google.android.gms:play-services-instantapps:17.0.0"
To enable instant app right-click on app module -> Refactor -> Enable instant app support.
Increment a version code to 1 and uploaded a new build on the play store.
Could you guys please help me out to find out the missing element or a direction?

Have you followed the below developer guide for the app asset link?
https://developer.android.com/training/app-links/verify-site-associations
In that, they have mentioned the steps which have to address accordingly.
Also, you can confirm that the Digital Asset Links JSON file is properly hosted and defined using the below URL:
https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=https://domain.name:optional_port&relation=delegate_permission/common.handle_all_urls

Related

Ionic 3 Error: "File google-services.json is missing. The Google Services Plugin cannot function without it." in ionic cordova build/prepare android

I am trying to do an ionic cordova build android command in my Ionic 3 project and I came across an error for File google-services.json is missing. The Google Services Plugin cannot function without it.
Here is the trace in my console:
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\nullnull\debug\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\debug\nullnull\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\nullnull\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\debug\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\nullnullDebug\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\google-services.json
Many answers I found online were to download the google-services.json file and put it in my platform/android/app folder. However, as my firebase application is a Web Application, I can't download the google-services.json file from there. All I can do is to copy the firebase config over to my html page.
When I tried to search my file directory, I couldn't find any google-service.json related files as well.
Please help me with this! My aim is to be able to run the application on the android studio's emulator.
Note that my firebase application is a Web Application and cannot download the google-service.json file directly from the firebase console.
In the Firebase Console, under your project's Project Settings you will find the configuration for your application.
As your project is currently configured as a web application, you will need to initialise your project to target other platforms (such as Android).
On the right-hand side of the page about halfway down, you will find an Add app button that will allow you to choose Android, configure it and then generate the google-services.json file.
Step 1 - Open "Project Settings" and click "Add app" button
Step 2 - Choose platform - Android, in this example
Step 3 - Follow configuration wizard
I found the solution for this!
I uninstalled the cordova-support-google-services by doing cordova plugin remove cordova-support-google-services and it managed to build. I tried to run it on Android Studio as well and it worked perfectly!

Android Applink url resolving conflicts error

I added .well-known/assetlinks.json to my site and when I try link and verify in android studio app link assistant it says "Success! Your app is associated with the selected domains." But when I test app links in android studio it says "URL resolving conflicts please link and verify your digital asset links". But in link and verify tab it says ok!
My application id is correct and I am trying on test apk on my mac and sha fingerprints is also correct.
what am i missing?
I get this error if the adb use libusb backend checkbox is not checked.
Go to Android Studio > User > Preferences... and on the left side menu click Build, Execution, Deployment. Then click Debugger. Under the title Android Debug Bridge check the use libusb backend checkbox and hit apply. Now retest the link.
May be you are missing buildToolsVersion in .gradle file.
Also hit the link with your applink.json hosted domain name change in https://digitalassetlinks.googleapis.com/v1/statements:list?source.web.site=<your-applink-hosted-domain>&relation=delegate_permission/common.handle_all_urls
Let me know if this fixes your issue.
Basically, there is a problem in the App Link Assistant itself. After successful link and verification process, it shows this error once in a while. But if you try again, it will be success. No need to worry. Just test in the actual phone and it should work fine.

Google Sign In method with Firebase not working through version control shared project in Android Studio

I have a team working on a project which uses Firebase for storing data and Google Sign in for authenticating users and their own stored data.
The problem is that everything works fine on my computer when I run the application through Android Studio (tried on 3 mobile phones), but when I share my code with my team through Git, they cannot sign in for some unknown reason. Then I've built an APK file and suddenly it all worked (they managed to run application on their phones).
Can anyone explain what is the main cause of this problem and how could I possibly edit the project to deliver a working project to my teammates on Git?
Your teammates should add a SHA fingerprint to your project in the firebase console. You can do that in your project's settings -> general and "ADD FINGERPRINT"

Is there another place to get a google-services.json?

I tried clicking the GET A CONFIGURATION FILE link from the docs, but the resulting page just loads and loads. This happens in Firefox and Chrome and on my phone. Is there some other way to get a config file?
EDIT: I am getting these errors in Chrome Dev Console:
Refused to display 'https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…ed%253Dtrue%26cntlbl%3DContinue%2BAdding%2BSign-In%26cntapi%3Dsignin&hl=en' in a frame because it set 'X-Frame-Options' to 'DENY'.
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://console.developers.google.com') does not match the recipient window's origin ('null').(anonymous function) # script_foot.js:348n.event.dispatch # jquery.min.js:3r.handle # jquery.min.js:3
This might be a temporary issue due to network connectivity or something like that.
One solution would be to try again at a later point in time. This might be happening because you're trying to download the google-services.json for the sample project (com.google.samples.quickstart.signin).
If you want result now, you could follow the steps to integrate the Google Sign In into your app.
Create a new empty android studio project/if you have an existing
project skip this step.
Use this link and follow the onscreen instructions to generate the google-services.json for your app.
The app name here refers to your project name in Google Developers
Console. If you've already setup your Google developers console
project for your android app, you can select that via the drop-down
menu. If you have not created one, just enter a name and that
project will be created for you in your developers console.
Select the google services you need for your project viz Google Sign
In, Google Cloud Messaging, AdMob etc. In our case, we just selected
Google Sign In.
You will be asked for SHA-1 hash. Follow these steps to get one.
Click on generate configuration files. Next screen you will be presented with an option to download google-services.json for your app. Download that and you're good to go.
Once you have the google-services.json, follow these steps to complete the Google Sign In.
References
Start Integrating Google Sign-In into Your Android App,
Integrating Google Sign-In into Your Android App.
You will get "google-services.json" as soon as you create a Firebase project.
But, in case you missed and forgot to download that, you can still get the JSON file from the existing project-
Just select the project from firebase console.
Head over to project settings
scroll down (Yeah!, there it is!)
Screenshot :
OK, I've found a workaround if anyone else is having this problem.
Based on the error message about being unable to display https://accounts.google.com/ServiceLogin?service=cloudconsole&osid=1&passiv…ed%253Dtrue%26cntlbl%3DContinue%2BAdding%2BSign-In%26cntapi%3Dsignin&hl=en in a frame... I just followed that link directly.
EDIT: None of the other links were working for me. If you came searching for the console errors Refused to display..., this is the answer for you. This bug seems to have been fixed for the google-services.json, so if you're just looking for the link, the highest-rated answer is the one you want.
Referring to this page:
The Firebase console will help you download the google-services.json. In addition, the Quickstart guides for most APIs have instructions for generating this file. Once you have downloaded the google-services.json file, copy it into the app/ folder of your Android Studio project, or into the app/src/{build_type} folder if you are using multiple build types.
So go to Firebase Console, press add new project and follow instructions

Deploy to App Engine trouble - You must be logged in to perform this action

I am new to Android Studio and have just runned through the tutorial
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints
without much trouble.
However, when I try to deploy my backend to the app server it promts me: "You must be logged in to perofrm this action".
I have no idea of why it teels that. I can easely find me project on the list, and Im logged in to my google acount on various browsers including Chrome.
Have seached the internet, but found no one else with the problem before.
Best Regards Allan
It's possible that your auth has been done a little while ago and the system cannot properly see you authenticated anymore, which would explain such a behavior.
At the bottom of the list of projects, you should see a "add account" button. Click on this and just re-auth. Should clear the bad tokens :).
Steps For Intrgration of App Engine Endpoints Module.
.....................................................
1-:Create an Google Devloper Console Account.Create a new project after completing the project creation they give you a Project id and project no.
2-:Open Android Studio File-->New-->New Project.
3-:After Project creation is completed Right Click On your project select Module-->Google Cloud Module as shown in images folder chouse_module image.
4-:When you Select The Google Cloud Module Then choose "App Engine Java Endpoints Module".as shown in images folder endpoints image.
5-:As soon as the backend module is added to your project and Gradle sync finishes,a new run configuration with your backend's module is created.
6-:Rebuild your project via "Build → Rebuild Project"
7-:Now Check Your Backend started sucesfully naivigate to http://localhost:8080.if your Backend started sucessfully you saw the screen as as shown in images folder devappserver-endpoints image.
Connecting your Backend to your android project.
...........................................................
8-:After Backend Module is created and added strong libraries is automatically genrated for you.
9-:To start sending requests to the added Cloud Endpoints backend API.you Have to created one Async Class in your Project file.you Can Get the Async task class in required Packages folder with name AsynctaskClass.java
10-:To make the actual call, invoke this AsyncTask from one of your Android activities.In this way :: new EndpointsAsyncTask().execute(new Pair(this, "Message"));
11-:Ckeck that you granted an internet permission in menifest or not.
12-:Now check that you have accese to local host as shown in point 7.
13-:Its time to Check in Emulator Change your Run confrigation and run your project If everything goes well, you should see the following toast in your app as shown in images folder emulator-Toast image.
Deploying the backend live to App Engine
......................................................
14-:If your backend is working locally, you can deploy it to Google App Engine.
Stop the backend, if it is running locally, by selecting Run > Stop.
Than navigate to Build > Deploy Module to App Engine.
15-:update your src/main/webapp/WEB-INF/appengine-web.xml file's property and replace myApplicationId with the ID of the project that you just created.as shown in point 1.
16-: you can see the screen as shown in images folder deploy-image image.
17-:In the Deploy to you have to select the project you created on Google Devloper Console.as shown in point 1.
18-:Put the version name and click deploy Button.
19-:Once you have deployed your backend to App Engine, you can connect your Android app to it by modifying AsyncTask class defined in point 9 replace the perticular lines shown in ReplaceCode.java file in required Packages folder.
20-:Now you can communicate with your new App Engine backend!.
For More Info -:
https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/HelloEndpoints.
https://cloud.google.com/tools/android-studio/app_engine/add_module?hl=en.
Ive never used android studio but Im sure its like eclipse sdk puglin.
There is an easy way to deploy ur apps on ur mobile device, but before u get to that point u need to eanable android mobile on debug mode (On settings,developer options).Once u have done that, Im pretty sure there is an option which lets u run ur app on android device making much smother than doing it virtual app.
Hope I helped ya...
Use the gradle commands.
Open the terminal within android studio and run
gradlew appengine:update
Or navigate to the gradle project window and look for the google appengine folder under your backend. And double click the appengineUpdate command.
Adding the backend with android studio should automatically add the appengine plugin for gradle in your backend build.gradle file like this. This plugin is allows you to run the appengine update command.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.18'
}
}
I was facing similar issue using Android Studio Ver2.2 in Ubuntu 14.04
I was not able to do sign-in into Android Studio using the SignIn icon from top-left of the Android Studio IDE. When signin icon clicked, a pop-up says that Sign-in using external browser but nothing would pop-up.
Build->Deploy to app Engine->Deploy to tab was also showing the same message as above but no browser would pop up
Even gradlew api:appengineUpdate was not working. (no browser would pop up).
Problem got resolved by changing the File->Setting->Web Browsers (it was listing browsers Chrome, Firefox, Safari in that order). The Default Browser was set to "First listed". I unchecked the chrome and my problem got solved, I was able sign-in and deploy my project.
I spent lot of time finding solution for this, thought it might help others, so posting it.
I had the same issue.
I did not realize it at first but when you get this message, you simply click on the dropdown "Deploy To", and then it invites you to log into your google account.
It is not very intuitive if your project is already selected by default.

Categories

Resources