Android ACRA form key? - android

I just started to build the concept using ACRA which will capture crashing error. And I want it to be emailed.
I am follwing this ....
http://code.google.com/p/acra/wiki/AdvancedUsage#Sending_reports_for_caught_exceptions_or_for_unexpected_applicat
So what is a form key? And where should I get it ?
Thanks.

ACRA can deliver the crash report using several different methods. one of those methods is posting to a google docs form. the form key is the google docs form key.
with the email method, the form key is not relevant. it's only for use with the google docs form method.
as a side note, the google docs method is the easiest and simplest to use. unless there's a reason why you need delivery via email, use google docs. you can even configure the form so you get an email when the form is updated - best of both worlds.

Please read the ACRA wiki BasicSetup.
In short, you have to copy the CrashReports-template.csv file from ACRA to Google Docs and create a form from it. Google Docs will then create a formKey for the form, which you can find in the link at the bottom of the form creation page.
EDIT:
Jeffrey Blattman's answer is more relevant, the formKey is not required in case of emailing the crash report.

Related

Leaked GCP API Keys : Your app contains exposed Google Cloud Platform (GCP) API keys. Please see this Google Help Center article for details

I am getting this error from Play Store:
I tried to limit the access of API key within that file but still getting this error. How can I solve this?
Make sure that keys are not leaked via sites such as GitHub.
Notice the message wording "Your app contains exposed ...". That message did not say your app is exposing the keys.
You will need to delete the key and create a new key, update your app, etc.
Delete current key and create new one. Also make sure you apply restrictions like HTTP referrers, IP Address restrictions etc. based on your use case. For more info, check this
https://cloud.google.com/docs/authentication/api-keys#api_key_restrictions
The error is due to the API key being included in your source code. Consider using Google's Secrets Gradle Plugin for Android to hide your API keys from source code. Documentation at https://github.com/google/secrets-gradle-plugin and demo by the author at https://youtu.be/X8lYNW_Or2o

Firebase authentification works but I get error when using the Google Text to Speech API

I've set up a small android and firebase app... Authentification works like a charm, and in the firebase console, I can see my user, logged in with the Google account.
Now I am trying to experiment a little with the Text to Speech api, and in doing so, I followed this tutorial:
https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/texttospeech/cloud-client
I managed to make the small java app work, by setting the GOOGLE_APPLICATION_CREDENTIALS Environment variable (I followed this tutorial for this step: https://cloud.google.com/docs/authentication/getting-started), but I am not sure what I need to do to make that code work in the Android app where the users are authentificated..
The Error that I get when trying to make a call to the TextToSpeech API is:
The Application Default Credentials are not available. They are
available if running in Google Compute Engine. Otherwise, the
environment variable GOOGLE_APPLICATION_CREDENTIALS must be defined
pointing to a file defining the credentials. See
https://developers.google.com/accounts/docs/application-default-credentials
for more information.
The error mentioned comes from the line:
TextToSpeechClient textToSpeechClient = TextToSpeechClient.create();
This error appears because of the fact that on the android emulator I don't have access to the credentials that are set as environment variable in my OS..So I have to provide the credentials in another way.
In the case of other Google APIs, like Storage, I found out that this can be done like this:
// You can specify a credential file by providing a path to GoogleCredentials.
// Otherwise credentials are read from the GOOGLE_APPLICATION_CREDENTIALS environment variable.
GoogleCredentials credentials = GoogleCredentials.fromStream(new FileInputStream(jsonPath))
.createScoped(Lists.newArrayList("https://www.googleapis.com/auth/cloud-platform"));
Storage storage = StorageOptions.newBuilder().setCredentials(credentials).build().getService();
I managed to create the GoogleCredentials object with the contents of the json file, however the TextToSpeech client doesn't seem to provide a functionality similar to this:
StorageOptions.newBuilder().setCredentials(credentials).build()
So my question is....is there a way to provide the Credentials object to the TextToSpeech client?
Thanks
Currently, there is not a way to provide credentials to the TTS Client from this page.
Due to Security / Auth reasons, I believe the best suggested approach is to use Firebase Functions.
Get the Text
Call Firebase Functions
Have Firebase Functions call the TTS API
Return the results.
This way, no keys are leaked inside the application and you can use Firebase Auth.
Let me know if that helps!
Update:
Option 2: iOS Tutorial (should be adaptable to Android)
Get the Text
Call Firebase Functions
Have Firebase Functions return an OAuth2 Token
Use the token directly with the API

Firebase DynamicLinks - Can i see analytics of link created by the new buildShortDynamicLink API?

I'm using the new buildShortDynamicLink API of Firebase (And it's great).
And i see there are two methodes for the ShortDynamicLink result:
Uri shortLink = task.getResult().getShortLink();
Uri flowchartLink = task.getResult().getPreviewLink();
I tried to use both but still the link doesn't apear in the Firebase dashboard.
What is getPreviewLink used for anyway?
Thanks.
Only analytics for links created in the console will show up in the console.
You can still access the analytics for your short links created via the API by using the Firebase Dynamic Links Rest API as described here (https://firebase.google.com/docs/reference/dynamic-links/analytics).
The getPreview returns the url to a visual flowchart that helps illustrate clearly how the link will work in each context. You can use it to debug the link if you want and to visually see how it will behave in different contexts.
Full disclosure: I work for Firebase.
This is expected. Only links created through the dashboard will show up there.
Think about it from this perspective: when your users are creating hundreds or even thousands of links per day, it will quickly make the dashboard completely useless if they all show up there.
At Branch.io (full disclosure: I'm on the Branch team), we take the same approach by default, though we do offer a manual flag you can change on programmatically-generated links to have them show up on the dashboard if desired.

'FirebaseAnalytics.Param.SIGN_UP_METHOD' is failing to save the 'value' along with 'Event name` in the console

I'm using this code to analyse the sign_up method user is using:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.SIGN_UP_METHOD, "sign_up_method");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SIGN_UP, bundle);
as soon as the user sign up, above given code is supposed to save the event in the Firebase console.
The problem is that the event is getting created but the there's nothing under the value column, i.e., sign_up_method is not getting shown.
Here's a snapshot from the console (event name: sign_up is there but in place of the sign_up_method, there is a -):
What's going wrong here?
Please let me know.
I asked the same question from the Firebase Support Team and they told me that
Unfortunately, not all parameters are represented directly in your
Analytics reports. It is only available on a subset of suggested
events. But they can be used as filters in Audience definitions for
every report. They are also included in data exported to BigQuery if
your app is linked to a BigQuery project.
So, either link your app to BigQuery or get satisfied with what Firebase has to provide.
Please check the Firebase Analytics docs for this. Looks like you are incorrectly setting the parameter as FirebaseAnalytics.Param.SIGN_UP_METHOD
It should be FirebaseAnalytics.Param.METHOD instead

ACRA formkey where to get it?

So I tried to follow instructions of https://github.com/ACRA/acra/wiki/BasicSetup but its too old or something.
Using my own gmail account I did import the csv file but there is no option "Create a LEGACY Form" in tools menu but only "Create form". If I create a form there are no fields of imported csv file (like I can see on screenshot in BasicSetup document) but it prompts to add fields manually using "Add item". And there is no any formkey around. The http link of form is looks like: https://docs.google.com/forms/d/1KNF_R4_Re0X0giFfEXwqXY50mpnFvQUvp0NLkKxyI/edit# or if I choose "view live form" it is https://docs.google.com/forms/d/1KNF_R4_Re0X0giFfEXwqXY50mpnFvQUvp0NLkKxyI/viewform As you can see there is no formkey included.
So the question is there I can find that fomkey now?
As the use of Google Docs is deprecated for ACRA I recommend you to use BugSense as your Back-End service:
1. Go to their site and sign in: http://www.bugsense.com/
2. Create a new project to monitor in BugSense site, as a result you will receive an API Key for this application.
3. Finally add this line to you Application class in you project:
#ReportsCrashes(formUri = "http://www.bugsense.com/api/acra?api_key=YOUR_API_KEY", formKey="")
You can also check this blog post I wrote on:
Crash Reports and Usage Monitoring
Google spreadsheets are not supported on ACRA. Use a third party provider like BugSense instead or write your own error collector.
I have tried ACRA with my custom domain which handled by google and at that time i could not found any option to create to
Create a LEGACY Form
then after i have tried with my personal gmail account and its works .
so i came to conclusion is that :
ACRA dose not support Third party domain even-though they provided
google .

Categories

Resources