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
Related
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?
I'm hoping to use the OpenLocate library to help post location data in my application. I've been trying to test that it is working before I start posting events over HTTP calls sent somewhere.
I want to verify two main things
Events are being collected at the frequency I expect
Events are being stored in the database
I've verified that OpenLocate is tracking when I run the app by printing out the OpenLocate.getInstance().isTracking() flag. I've also tried using Stetho to inspect my package to see if I could read the db, but unfortunately nothing shows up.
If anyone has some experience with OpenLocate and can give me some info that would be great.
I've implemented an ErrorHandler class into my app which is working just great but as I'm not sure if what I'm doing can fit into "best practices" just would like to share it with you to have your opinion.
My question is silly and my class is very simple. All that I do is the next: in every catch block of my whole java code I do a call to ErrorHabdler.log(e) (which works as an AsyncTask) and as I'm working with AWS what log(e) does is capture all information about the error, like message, device name and model, etc (NO user information) and sends a formatted email with the error to a specific email address.
Another possibility would be to create a new table into my AWS DynamoDB set called Exceptions and instead of sending an email in background write the error log into that new table to have errors more "centralized".
I'd like to know if you consider what I'm actualli doing a good practice, or if you prefer my second choice, or maybe none of them and you would better use a third party error logger.
Best!
There are several Crashlytics tools on the internet.
The best choice is to go to these tools, which make it easier to control crashes reports.
The most common, and is what I use in most of my projects, is Frabric.IO Crashlytics ,: https://fabric.io/kits/android/crashlytics
You can follow these steps to install Crashlytics in your project: https://fabric.io/kits/android/crashlytics/install
Is there a way to attach complete logcats to crashes using Firebase Crash Reporting? I did notice that the Firebase SDK has some log functions, but those have to be specifically invoked. My app already does a ton of logging to logcat using our own custom loggger (not Android logger) anyways, so I would hate to have to duplicate the log calls to Firebase.
For example, I would need to do:
MyLogger.d(TAG, "my log message");
Firebase.log("my log message");
Sending a complete logcat isn't really possible because modern Android permissions don't allow apps to access that any more (as logs could easily and accidentally contain sensitive information). You will need to invoke the logging API to get logs attached. It's advisable to hook your existing logging infrastructure to make this happen without duplication at every location.
So does anyone know if there is a program that will allow me to track how many times my app is opened daily?
I'm not looking to track the users behavior or anything, I just what stats on the average use of my app.
To know this you need to send information to a server somehow. On the device you would need some kind of library or code that posts this information. On the server you need some service that receives it.
There's a number of tools that let you do that. Analytics tools for example: http://code.google.com/mobile/analytics/docs/
If you don't want to use a pre-made tool you could simply use an HttpClient and you could make a simple Servlet on the server that dumps the use count into a database.
Tow more details:
1- Make sure you ask the user for permission the first time he runs your app. This could be problematic for him because of privacy and bandwith.
2- I would batch this and send it to the server once per day (midnight).
I hope this helps.
Emmanuel
If want something easy to implement, you can use http://www.localytics.com/ I've used it for a couple of apps and it works really well.