Firebase Performance Monitoring showing 0 sessions - android

I have added firebase performance monitoring following the documentation. There is data showing up but its saying 0 sessions and when viewing the sessions no cpu/memory data is showing up but it is saying that I need to update the SDK to see that information.

One of the possible issues is that there is a random sampling on different sessions that can captures such detailed metrics. May be that is causing this happen. Try generating more scenarios and you should be able to see some sessions with actual data.
https://firebase.google.com/docs/perf-mon/automatic?authuser=0#more-detail-trace-samples

Please Check Your Firebase Remote Config

Related

Why does not the data come to FirebaseAnalytics?

After updating the application, the data does not come to FirebaseAnalytics,
those that are Automatically collected events https://support.google.com/firebase/answer/9234069?hl=en The libraries associated with Firebase remained the same, the file and the project too (in the studio it says Connected), and the connection is the same, but the data stopped arriving (there were none custom events). It seems that something is interfering with sending data from the application to Firebase. I tried to debug the line mFirebaseAnalytics = FirebaseAnalytics.getInstance(this) To see what is inside mFirebaseAnalytics, but there is a lot of information that it is not clear where to look. Are there ways to programmatically find out if data is being sent to Firebase? Or maybe someone came across a similar thing, what else can it be, please tell me which way to dig !?
Are you developping a single page app? Firebase analytics take some time to show events.
Read it: How to track page view with Firebase Analytics in a web, single page app?

How firestore logging works?

In firestore references, a method is given as
public static void setLoggingEnabled (boolean loggingEnabled)
And in its description given
"Globally enables/disables Firestore logging for the SDK"
I don't understand what it means by global here, because I am already able to add failure listeners and add logs
Will it sends logs directly to firebase Crashlytics or
Logs will be saved on all devices which uses my app or
Will it be only visible in my android studio logs?
Should I enable this? Please help me out.
Enabling this logging will write additional information to the logcat output of your app on things like wire traffic (so the data that goes over the wire), encoding an decoding of the data, and much more. This sort of information is typically used for troubleshooting problems in the implementation. No information is sent to Crashlytics, nor are these logs automatically saved anywhere.

Firebase Realtime Database Limit Exceed

I want to know what will happen when the limit is exceeded for Firebase Realtime Database. The thing is I know the maximum number of connections I can have is 100 only. Now, suppose my android app has active 1,000 users and I implement Realtime Database. Then the first 100 users will get connect to the database. I want to know what will happen to the user number 101, how I know the connection is unsuccessful, is there any Exception that is thrown or some function isSuccessful(). How to handle that kind of thing in my app.
I have already seen: Link Link
I want to know how to tell the app that it is not connected and when any user disconnects, do I need to run init statement again and when?
Thanks in Advance :)
As found here from a Firebase developer
There is no current way to detect this programmatically. An error
message will be asynchronously thrown in the developer console when
the 51st connection is made.
But this post is from 2014 so maybe that changed.

Get logs from android when app is app store

Currently we can use logcat or ask other testers to send logcat files. But What i want as to see logs when app is on play store. So let's say if any request contact us for some problem that he is facing. Then it would be easier for us to see that user's device logs and figure out the issue. Because some issues are not easily reproducible.
Is there a way I can get the logs of device which i don't have a physically access to using some tool when the app is on play store?
EDIT
I don't want use in a way where user has to upload logs files and manually send it to our team. It should display live log on a website or provider's console.
You can track logs with Google Analytics. Just send trackers to analytics on the places you usually send logs.(You must initialize tracker first. See link below)
Example :
Tracker defaultTracker = GoogleAnalytics.getInstance(this).getDefaultTracker();
defaultTracker.send(MapBuilder.createEvent("Logger", "Log_Tag",
"Log_msg", null).build());
And you will get a event group in the Behaviour section of google analytics called Logger that has list of Log_Tags that has List of Log_msg
It is pretty easy to implement. See this link on how to add Google Analytics to your app https://developers.google.com/analytics/devguides/collection/android/v3/
Hope this helps you.
You need a custom Log service to store the important logs/errors
From your app if any crashes or important Logs you send it Log server for future reference.
Click Here
You should try Crashlytics
Crashlytics for Android delivers real-time crash reporting across all devices. We perform a deep analysis of each stack trace to identify the most important frames and we break down every bug by device model and version so you can spend less time finding and more time fixing issues.
What if "NETWORK" is not available when your app crashed on users device to update/send a crash report to you.
For me,
1.) I will get Crash Reports when User hits "Report to developer" at the time of crash.
2.) I use Google Analytics, to get the description of the app with location(which line of code) of error from "Crashes and Exceptions" under "Behaviour" tab.
Also, by modifying/adding your Google Analytics Code, as mentioned here: Crashes & Exceptions
Try your Luck!
You can use Log4j library in android.
What is Log4j library?
It is an logger library in java. And it allow the application to write logs in to your file, email when caught exceptions and can send logs in background to your server or any else. So that you can see the logs of every individual device and track the issues.
download it from the below link:
Log4j for android
Hope it will help you.
Currently I'm using ACRA.
The official link contains all details you need and offers different way of "User interaction mode", "Reports destination" and "Reports content".
If you implement it very well on your app, you can have a full report of what is happening.
Keeping in mind few things u can do it :-
create log files.
store them in your applications private area and not in sdcard ( to avoid deletion by user
or if on sdcard then use . before directory to hide it from user )
keep a service running at the background.
start uploading the document after every hour or when app moves in the background or the
file size increase >10 kb etc... depends upon choice. and remember to upload all files
in this directory.
if uploads successfully delete dat file else leave it which will be uploaded next time.
try to implement zip to make single file if file count is gr8er then 5 suppose.
In a nutshell :-
a. record.
b. zip
c. upload
c. delete.
this is my view remember

cross-platform real time update for mobile phones

i'm looking for a way to sync items stored in a database among users
so anyone of those users changes anything from his phone , the change will be reflected in the database and SYNC with all users related to him in real time
what's the best way to achieve the real time sync ? push notification ? is Urban airship what i'm looking for ?
Syncing data well is often specific to your application and your data. It's beyond the scope of an SO question but here's some thoughts if you implement your own ...
Some of the interesting design points are:
Reliably getting a delta
Dealing with conflicts
How real time is real time?
For reliably getting a delta, be careful about relying on date time for distributed machines. This post discussed some of those challenges and some alternatives.
Can I Rely on the iOS Device Clock Being Correct?
Merging new entities is easy but if multiple folks are editing the same entity, you need to decide how to merge. For conflicts, you can in order of preference (1) auto merge - come up with an algorithm that automatically merges the content without user intervention and ideally with no data loss (2) rely on the user to merge with an interface and (3) a form of auto-merge: last write wins. There's also variations where you interleave the revisions - it's a form of last write wins but the revisions are maintained . You can also auto merge at a field level of an entity if that's appropriate. My post to the question above covers interleaving but it depends on what your data is.
How real is real time? When syncing occasionally connected devices, the devices will getting farther and farther out of date and it takes time to catch up. Consider batching sets of changes in the communication pattern to optimize but it will still not be real time. Embrace that in the design - does the user see data animate into there current views as data is synchronized?
Architecturally, you'll likely want to expose your data in the cloud through REST services or SOAP web services since it's cross platform. For multiple devices platforms, you'll likely end up porting the sync algorithm. The best you could hope for is using something like Sqlite so you can share your devices database schema code and sql statements.
I would start with Dan Grover's presentation, "Cross-Platform Data Synchronization": http://iphone2009.crowdvine.com/talk/presentation_file/5104/Grover_Syncing.pdf

Categories

Resources