I want to develop a log frame work for my application .The things i want to achieve is
First of all i want to know is this possible ?? I guess by using service we acheive this . if i am wrong please correct me
I refer this project for achieving my needs https://github.com/androidnerds/logger
In this project they are using AIDL to create a service to record the logs .But the saving of file occur only when ever the intent for that .
Seriously i'm new to this AIDL process . The point that confuses me is the sample project doesn't give any permission in manifest to WRITE FILES to storage .But it's able to do that . How did they achieve that??
Even i had gone through these questions
But nothing working for me. So please suggest a way to achieve this
I suggest to take a look at ACRA.
https://github.com/ACRA/acra
At least if you don't want to use it, it's still open source so you can take a look at the code. They do a lot of thing you want to achieve and when looking at the code you may find answers to your question.
I forked ACRA to make some of the things you mention in your questions :
How do I get the logfile from an Android device?
You can log into the acra report file everything you want. We use a special logger that write into the acra logfile. So we know what is the sequence of events that triggered the crash.
Programmatically get log cat data
It's a text file, we use [sections] and timestamp/key=value to display logs to the users before sending the report. Be careful to anonymize your log reports and do not put personnal informations about your users.
Write android logcat data to a file
Save Data of LogCat in android
How to save LogCat contents to file?
How to write entire Logcat in to sdcard?
Filter LogCat to get only the messages from My Application in Android?
Everything that you ask here is already managed by ACRA. There is an extension mechanism that allows you to write your own sender and your own reporter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With