Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Chairi Kiourt
OK, thank you for your help Steve Gabrilowitz, i will try it as soon as 
possible, but some minutes ago i tried the FIREBASE with a demo and it is 
superb.

I would like to thank both of you *Steve Gabrilowitz* and *sardar khan *for 
you help

Soon i will inform you for my bugs, if i catch them.

Thank you again

On Tuesday, November 8, 2016 at 11:24:16 PM UTC+2, Steve Gabrilowitz wrote:
>
> that's not what my logevent does,  I have it set up with sharedpreference 
> so I can easily display it in a window in the app.  I gave you the 
> pertinent code to capture the information you need, again what you choose 
> to do with it depends on the rest of your app!
>
> On Nov 8, 2016 2:09 PM, "Chairi Kiourt"  
> wrote:
>
>> Is it easy for you to provide my the LogEvent code, that stores every 
>> crash within a new file, which name is the that time date and time ??
>>
>>
>> X.
>>
>> On Tuesday, November 8, 2016 at 8:49:51 PM UTC+2, Steve Gabrilowitz wrote:
>>>
>>> I didn't include the LogEvent implementation on purpose, once you have 
>>> the string you can do whatever you like with it, perhaps keep an ErrorLog 
>>> table in your database?
>>>
>>> On Nov 8, 2016 1:32 PM, "Chairi Kiourt"  wrote:
>>> >
>>> > Thank you for your answer Steve Gabrilowitz, like i notice this code 
>>> creates a string with the error, but i didnt understand if stores the 
>>> string into a file, if it stores the error into a file, where i can find 
>>> the file ??? and does any error is stored into a new file ??? which means 
>>> that i will have several error files for several crashes ???
>>> >
>>> >
>>> > Thank you again
>>> >
>>> >  
>>> >
>>> > On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz 
>>> wrote:
>>> >>
>>> >> Try something like this:
>>> >>
>>> >> package com.gabriloware.teslalib;
>>> >>
>>> >> import java.io.PrintWriter;
>>> >> import java.io.StringWriter;
>>> >>
>>> >> import android.content.Context;
>>> >> import android.content.Intent;
>>> >> import android.os.Build;
>>> >>
>>> >> public class ExceptionHandler implements
>>> >>  Thread.UncaughtExceptionHandler {
>>> >>  private final Context myContext;
>>> >>  private final String LINE_SEPARATOR = "\n";
>>> >>
>>> >>  private Tesla MyTesla=null;
>>> >>
>>> >>  public ExceptionHandler(Context context) {
>>> >>  myContext = context;
>>> >>  }
>>> >>
>>> >>  public void uncaughtException(Thread thread, Throwable exception) {
>>> >>  StringWriter stackTrace = new StringWriter();
>>> >>  exception.printStackTrace(new PrintWriter(stackTrace));
>>> >>  StringBuilder errorReport = new StringBuilder();
>>> >>  errorReport.append(" CAUSE OF ERROR \n\n");
>>> >>  errorReport.append(stackTrace.toString());
>>> >>
>>> >> /*
>>> >>  errorReport.append("\n DEVICE INFORMATION 
>>> ***\n");
>>> >>  errorReport.append("Brand: ");
>>> >>  errorReport.append(Build.BRAND);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("Device: ");
>>> >>  errorReport.append(Build.DEVICE);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("Model: ");
>>> >>  errorReport.append(Build.MODEL);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("Id: ");
>>> >>  errorReport.append(Build.ID);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("Product: ");
>>> >>  errorReport.append(Build.PRODUCT);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("\n FIRMWARE \n");
>>> >>  errorReport.append("SDK: ");
>>> >>  errorReport.append(Build.VERSION.SDK);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("Release: ");
>>> >>  errorReport.append(Build.VERSION.RELEASE);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>  errorReport.append("Incremental: ");
>>> >>  errorReport.append(Build.VERSION.INCREMENTAL);
>>> >>  errorReport.append(LINE_SEPARATOR);
>>> >>
>>> >> */
>>> >>  if (MyTesla==null)
>>> >>  MyTesla = new Tesla(myContext);
>>> >>  MyTesla.LogEvent("EXCEPTION",errorReport.toString());
>>> >>
>>> >>  Intent intent = new Intent(myContext, CrashActivity.class);
>>> >>  intent.putExtra("error", errorReport.toString());
>>> >>  myContext.startActivity(intent);
>>> >>
>>> >>
>>> >>  android.os.Process.killProcess(android.os.Process.myPid());
>>> >>  System.exit(10);
>>> >>
>>> >>  }
>>> >>
>>> >> }
>>> >>
>>> >>
>>> >>
>>> >> public class TeslaApplication extends Application {
>>> >>
>>> >>  public LogFragment Logger=null;
>>> >>
>>> >>  @Override
>>> >>  public void onCreate() {
>>> >>  super.onCreate();
>>> >>  Thread.setDefaultUncaughtExceptionHandler(new 
>>> ExceptionHandler(this));
>>> >>  new Tesla(this).Init2();
>>> >>
>>> >>
>>> >>  }
>>> >>
>>> >> ...
>>> >>
>>> >>
>>> >> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  
>>> wrote:
>>> >>>
>>> >>> Hi everyone,
>>> >>>
>>> >>> I am new on developing android app and i have a problem.
>>> >>>

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Steve Gabrilowitz
that's not what my logevent does,  I have it set up with sharedpreference
so I can easily display it in a window in the app.  I gave you the
pertinent code to capture the information you need, again what you choose
to do with it depends on the rest of your app!

On Nov 8, 2016 2:09 PM, "Chairi Kiourt"  wrote:

> Is it easy for you to provide my the LogEvent code, that stores every
> crash within a new file, which name is the that time date and time ??
>
>
> X.
>
> On Tuesday, November 8, 2016 at 8:49:51 PM UTC+2, Steve Gabrilowitz wrote:
>>
>> I didn't include the LogEvent implementation on purpose, once you have
>> the string you can do whatever you like with it, perhaps keep an ErrorLog
>> table in your database?
>>
>> On Nov 8, 2016 1:32 PM, "Chairi Kiourt"  wrote:
>> >
>> > Thank you for your answer Steve Gabrilowitz, like i notice this code
>> creates a string with the error, but i didnt understand if stores the
>> string into a file, if it stores the error into a file, where i can find
>> the file ??? and does any error is stored into a new file ??? which means
>> that i will have several error files for several crashes ???
>> >
>> >
>> > Thank you again
>> >
>> >
>> >
>> > On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz
>> wrote:
>> >>
>> >> Try something like this:
>> >>
>> >> package com.gabriloware.teslalib;
>> >>
>> >> import java.io.PrintWriter;
>> >> import java.io.StringWriter;
>> >>
>> >> import android.content.Context;
>> >> import android.content.Intent;
>> >> import android.os.Build;
>> >>
>> >> public class ExceptionHandler implements
>> >>  Thread.UncaughtExceptionHandler {
>> >>  private final Context myContext;
>> >>  private final String LINE_SEPARATOR = "\n";
>> >>
>> >>  private Tesla MyTesla=null;
>> >>
>> >>  public ExceptionHandler(Context context) {
>> >>  myContext = context;
>> >>  }
>> >>
>> >>  public void uncaughtException(Thread thread, Throwable exception) {
>> >>  StringWriter stackTrace = new StringWriter();
>> >>  exception.printStackTrace(new PrintWriter(stackTrace));
>> >>  StringBuilder errorReport = new StringBuilder();
>> >>  errorReport.append(" CAUSE OF ERROR \n\n");
>> >>  errorReport.append(stackTrace.toString());
>> >>
>> >> /*
>> >>  errorReport.append("\n DEVICE INFORMATION
>> ***\n");
>> >>  errorReport.append("Brand: ");
>> >>  errorReport.append(Build.BRAND);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("Device: ");
>> >>  errorReport.append(Build.DEVICE);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("Model: ");
>> >>  errorReport.append(Build.MODEL);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("Id: ");
>> >>  errorReport.append(Build.ID);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("Product: ");
>> >>  errorReport.append(Build.PRODUCT);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("\n FIRMWARE \n");
>> >>  errorReport.append("SDK: ");
>> >>  errorReport.append(Build.VERSION.SDK);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("Release: ");
>> >>  errorReport.append(Build.VERSION.RELEASE);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>  errorReport.append("Incremental: ");
>> >>  errorReport.append(Build.VERSION.INCREMENTAL);
>> >>  errorReport.append(LINE_SEPARATOR);
>> >>
>> >> */
>> >>  if (MyTesla==null)
>> >>  MyTesla = new Tesla(myContext);
>> >>  MyTesla.LogEvent("EXCEPTION",errorReport.toString());
>> >>
>> >>  Intent intent = new Intent(myContext, CrashActivity.class);
>> >>  intent.putExtra("error", errorReport.toString());
>> >>  myContext.startActivity(intent);
>> >>
>> >>
>> >>  android.os.Process.killProcess(android.os.Process.myPid());
>> >>  System.exit(10);
>> >>
>> >>  }
>> >>
>> >> }
>> >>
>> >>
>> >>
>> >> public class TeslaApplication extends Application {
>> >>
>> >>  public LogFragment Logger=null;
>> >>
>> >>  @Override
>> >>  public void onCreate() {
>> >>  super.onCreate();
>> >>  Thread.setDefaultUncaughtExceptionHandler(new
>> ExceptionHandler(this));
>> >>  new Tesla(this).Init2();
>> >>
>> >>
>> >>  }
>> >>
>> >> ...
>> >>
>> >>
>> >> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt 
>> wrote:
>> >>>
>> >>> Hi everyone,
>> >>>
>> >>> I am new on developing android app and i have a problem.
>> >>>
>> >>> I have developed and app for restaurant order in android studio,
>> which communicates wit an Apache server to get the dishes, dish categories,
>> available tables, receipts and etc.
>> >>> I use php to get the data from the mysql and to store data from the
>> tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
>> >>> For me everything worked ok, in the emulator as well as in the tabet.
>> >>>
>> >>> I gave this app to an restaurant and they tell me that the app
>> crashes some time, without giving any error notification, it say just that
>> 

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Chairi Kiourt
If i include firebase in my project and i use the firebase crash report 
system does my app will increase its size and will be more slow ???

Thank you again. 

On Tuesday, November 8, 2016 at 8:51:13 PM UTC+2, sardar khan wrote:
>
> https://firebase.google.com/docs/crash/android
> you can use this,,
>
> On Tue, Nov 8, 2016 at 11:32 PM, Chairi Kiourt  > wrote:
>
>> Thank you for your answer Steve Gabrilowitz, like i notice this code 
>> creates a string with the error, but i didnt understand if stores the 
>> string into a file, if it stores the error into a file, where i can find 
>> the file ??? and does any error is stored into a new file ??? which means 
>> that i will have several error files for several crashes ???
>>
>>
>> Thank you again
>>
>>  
>>
>> On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz wrote:
>>>
>>> Try something like this:
>>>
>>> package com.gabriloware.teslalib;
>>>
>>> import java.io.PrintWriter;
>>> import java.io.StringWriter;
>>>
>>> import android.content.Context;
>>> import android.content.Intent;
>>> import android.os.Build;
>>>
>>> public class ExceptionHandler implements
>>>   Thread.UncaughtExceptionHandler {
>>>private final Context myContext;
>>>private final String LINE_SEPARATOR = "\n";
>>>
>>> private Tesla MyTesla=null;
>>>
>>>public ExceptionHandler(Context context) {
>>>   myContext = context;
>>>}
>>>
>>>public void uncaughtException(Thread thread, Throwable exception) {
>>>   StringWriter stackTrace = new StringWriter();
>>>   exception.printStackTrace(new PrintWriter(stackTrace));
>>>   StringBuilder errorReport = new StringBuilder();
>>>   errorReport.append(" CAUSE OF ERROR \n\n");
>>>   errorReport.append(stackTrace.toString());
>>>
>>> /*
>>>   errorReport.append("\n DEVICE INFORMATION ***\n");
>>>   errorReport.append("Brand: ");
>>>   errorReport.append(Build.BRAND);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("Device: ");
>>>   errorReport.append(Build.DEVICE);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("Model: ");
>>>   errorReport.append(Build.MODEL);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("Id: ");
>>>   errorReport.append(Build.ID);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("Product: ");
>>>   errorReport.append(Build.PRODUCT);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("\n FIRMWARE \n");
>>>   errorReport.append("SDK: ");
>>>   errorReport.append(Build.VERSION.SDK);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("Release: ");
>>>   errorReport.append(Build.VERSION.RELEASE);
>>>   errorReport.append(LINE_SEPARATOR);
>>>   errorReport.append("Incremental: ");
>>>   errorReport.append(Build.VERSION.INCREMENTAL);
>>>   errorReport.append(LINE_SEPARATOR);
>>>
>>> */
>>> if (MyTesla==null)
>>> MyTesla = new Tesla(myContext);
>>> MyTesla.LogEvent("EXCEPTION",errorReport.toString());
>>>
>>> Intent intent = new Intent(myContext, CrashActivity.class);
>>> intent.putExtra("error", errorReport.toString());
>>> myContext.startActivity(intent);
>>>
>>>
>>> android.os.Process.killProcess(android.os.Process.myPid());
>>> System.exit(10);
>>>
>>>}
>>>
>>> }
>>>
>>>
>>>
>>> public class TeslaApplication extends Application {
>>>
>>> public  LogFragment Logger=null;
>>>
>>> @Override
>>> public void onCreate() {
>>> super.onCreate();
>>> Thread.setDefaultUncaughtExceptionHandler(new 
>>> ExceptionHandler(this));
>>> new Tesla(this).Init2();
>>>
>>>
>>> }
>>>
>>> ...
>>>
>>>
>>> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  wrote:
>>>
 Hi everyone,

 I am new on developing android app and i have a problem.

 I have developed and app for restaurant order in android studio, which 
 communicates wit an Apache server to get the dishes, dish categories, 
 available tables, receipts and etc.
 I use php to get the data from the mysql and to store data from the 
 tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
 For me everything worked ok, in the emulator as well as in the tabet.

 I gave this app to an restaurant and they tell me that the app crashes 
 some time, without giving any error notification, it say just that the app 
 crashed and will restart.
 All the system works offline, without internet, just a local network.

 Now he question is, is there any way to keep somehow crash report in 
 the tablet and in the end after some day to get them ?
 I find out that in logcat i can get the crash report if i get it 
 exactly after the crash, the problem is that 

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Chairi Kiourt
Is it easy for you to provide my the LogEvent code, that stores every crash 
within a new file, which name is the that time date and time ??


X.

On Tuesday, November 8, 2016 at 8:49:51 PM UTC+2, Steve Gabrilowitz wrote:
>
> I didn't include the LogEvent implementation on purpose, once you have the 
> string you can do whatever you like with it, perhaps keep an ErrorLog table 
> in your database?
>
> On Nov 8, 2016 1:32 PM, "Chairi Kiourt"  
> wrote:
> >
> > Thank you for your answer Steve Gabrilowitz, like i notice this code 
> creates a string with the error, but i didnt understand if stores the 
> string into a file, if it stores the error into a file, where i can find 
> the file ??? and does any error is stored into a new file ??? which means 
> that i will have several error files for several crashes ???
> >
> >
> > Thank you again
> >
> >  
> >
> > On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz 
> wrote:
> >>
> >> Try something like this:
> >>
> >> package com.gabriloware.teslalib;
> >>
> >> import java.io.PrintWriter;
> >> import java.io.StringWriter;
> >>
> >> import android.content.Context;
> >> import android.content.Intent;
> >> import android.os.Build;
> >>
> >> public class ExceptionHandler implements
> >>  Thread.UncaughtExceptionHandler {
> >>  private final Context myContext;
> >>  private final String LINE_SEPARATOR = "\n";
> >>
> >>  private Tesla MyTesla=null;
> >>
> >>  public ExceptionHandler(Context context) {
> >>  myContext = context;
> >>  }
> >>
> >>  public void uncaughtException(Thread thread, Throwable exception) {
> >>  StringWriter stackTrace = new StringWriter();
> >>  exception.printStackTrace(new PrintWriter(stackTrace));
> >>  StringBuilder errorReport = new StringBuilder();
> >>  errorReport.append(" CAUSE OF ERROR \n\n");
> >>  errorReport.append(stackTrace.toString());
> >>
> >> /*
> >>  errorReport.append("\n DEVICE INFORMATION ***\n");
> >>  errorReport.append("Brand: ");
> >>  errorReport.append(Build.BRAND);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("Device: ");
> >>  errorReport.append(Build.DEVICE);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("Model: ");
> >>  errorReport.append(Build.MODEL);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("Id: ");
> >>  errorReport.append(Build.ID);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("Product: ");
> >>  errorReport.append(Build.PRODUCT);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("\n FIRMWARE \n");
> >>  errorReport.append("SDK: ");
> >>  errorReport.append(Build.VERSION.SDK);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("Release: ");
> >>  errorReport.append(Build.VERSION.RELEASE);
> >>  errorReport.append(LINE_SEPARATOR);
> >>  errorReport.append("Incremental: ");
> >>  errorReport.append(Build.VERSION.INCREMENTAL);
> >>  errorReport.append(LINE_SEPARATOR);
> >>
> >> */
> >>  if (MyTesla==null)
> >>  MyTesla = new Tesla(myContext);
> >>  MyTesla.LogEvent("EXCEPTION",errorReport.toString());
> >>
> >>  Intent intent = new Intent(myContext, CrashActivity.class);
> >>  intent.putExtra("error", errorReport.toString());
> >>  myContext.startActivity(intent);
> >>
> >>
> >>  android.os.Process.killProcess(android.os.Process.myPid());
> >>  System.exit(10);
> >>
> >>  }
> >>
> >> }
> >>
> >>
> >>
> >> public class TeslaApplication extends Application {
> >>
> >>  public LogFragment Logger=null;
> >>
> >>  @Override
> >>  public void onCreate() {
> >>  super.onCreate();
> >>  Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
> >>  new Tesla(this).Init2();
> >>
> >>
> >>  }
> >>
> >> ...
> >>
> >>
> >> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  
> wrote:
> >>>
> >>> Hi everyone,
> >>>
> >>> I am new on developing android app and i have a problem.
> >>>
> >>> I have developed and app for restaurant order in android studio, which 
> communicates wit an Apache server to get the dishes, dish categories, 
> available tables, receipts and etc.
> >>> I use php to get the data from the mysql and to store data from the 
> tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
> >>> For me everything worked ok, in the emulator as well as in the tabet.
> >>>
> >>> I gave this app to an restaurant and they tell me that the app crashes 
> some time, without giving any error notification, it say just that the app 
> crashed and will restart.
> >>> All the system works offline, without internet, just a local network.
> >>>
> >>> Now he question is, is there any way to keep somehow crash report in 
> the tablet and in the end after some day to get them ?
> >>> I find out that in logcat i can get the crash report if i get it 
> exactly after the crash, the problem is that i cannot be there to get the 
> logcat file in that moment.
> >>>
> >>> Please any 

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread sardar khan
https://firebase.google.com/docs/crash/android
you can use this,,

On Tue, Nov 8, 2016 at 11:32 PM, Chairi Kiourt  wrote:

> Thank you for your answer Steve Gabrilowitz, like i notice this code
> creates a string with the error, but i didnt understand if stores the
> string into a file, if it stores the error into a file, where i can find
> the file ??? and does any error is stored into a new file ??? which means
> that i will have several error files for several crashes ???
>
>
> Thank you again
>
>
>
> On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz wrote:
>>
>> Try something like this:
>>
>> package com.gabriloware.teslalib;
>>
>> import java.io.PrintWriter;
>> import java.io.StringWriter;
>>
>> import android.content.Context;
>> import android.content.Intent;
>> import android.os.Build;
>>
>> public class ExceptionHandler implements
>>   Thread.UncaughtExceptionHandler {
>>private final Context myContext;
>>private final String LINE_SEPARATOR = "\n";
>>
>> private Tesla MyTesla=null;
>>
>>public ExceptionHandler(Context context) {
>>   myContext = context;
>>}
>>
>>public void uncaughtException(Thread thread, Throwable exception) {
>>   StringWriter stackTrace = new StringWriter();
>>   exception.printStackTrace(new PrintWriter(stackTrace));
>>   StringBuilder errorReport = new StringBuilder();
>>   errorReport.append(" CAUSE OF ERROR \n\n");
>>   errorReport.append(stackTrace.toString());
>>
>> /*
>>   errorReport.append("\n DEVICE INFORMATION ***\n");
>>   errorReport.append("Brand: ");
>>   errorReport.append(Build.BRAND);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("Device: ");
>>   errorReport.append(Build.DEVICE);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("Model: ");
>>   errorReport.append(Build.MODEL);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("Id: ");
>>   errorReport.append(Build.ID);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("Product: ");
>>   errorReport.append(Build.PRODUCT);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("\n FIRMWARE \n");
>>   errorReport.append("SDK: ");
>>   errorReport.append(Build.VERSION.SDK);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("Release: ");
>>   errorReport.append(Build.VERSION.RELEASE);
>>   errorReport.append(LINE_SEPARATOR);
>>   errorReport.append("Incremental: ");
>>   errorReport.append(Build.VERSION.INCREMENTAL);
>>   errorReport.append(LINE_SEPARATOR);
>>
>> */
>> if (MyTesla==null)
>> MyTesla = new Tesla(myContext);
>> MyTesla.LogEvent("EXCEPTION",errorReport.toString());
>>
>> Intent intent = new Intent(myContext, CrashActivity.class);
>> intent.putExtra("error", errorReport.toString());
>> myContext.startActivity(intent);
>>
>>
>> android.os.Process.killProcess(android.os.Process.myPid());
>> System.exit(10);
>>
>>}
>>
>> }
>>
>>
>>
>> public class TeslaApplication extends Application {
>>
>> public  LogFragment Logger=null;
>>
>> @Override
>> public void onCreate() {
>> super.onCreate();
>> Thread.setDefaultUncaughtExceptionHandler(new 
>> ExceptionHandler(this));
>> new Tesla(this).Init2();
>>
>>
>> }
>>
>> ...
>>
>>
>> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  wrote:
>>
>>> Hi everyone,
>>>
>>> I am new on developing android app and i have a problem.
>>>
>>> I have developed and app for restaurant order in android studio, which
>>> communicates wit an Apache server to get the dishes, dish categories,
>>> available tables, receipts and etc.
>>> I use php to get the data from the mysql and to store data from the
>>> tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
>>> For me everything worked ok, in the emulator as well as in the tabet.
>>>
>>> I gave this app to an restaurant and they tell me that the app crashes
>>> some time, without giving any error notification, it say just that the app
>>> crashed and will restart.
>>> All the system works offline, without internet, just a local network.
>>>
>>> Now he question is, is there any way to keep somehow crash report in the
>>> tablet and in the end after some day to get them ?
>>> I find out that in logcat i can get the crash report if i get it
>>> exactly after the crash, the problem is that i cannot be there to get the
>>> logcat file in that moment.
>>>
>>> Please any help
>>>
>>>
>>> Thank you in advance
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to android-developers+unsubscr...@googlegroups.com.
>>> 

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Steve Gabrilowitz
I didn't include the LogEvent implementation on purpose, once you have the
string you can do whatever you like with it, perhaps keep an ErrorLog table
in your database?

On Nov 8, 2016 1:32 PM, "Chairi Kiourt"  wrote:
>
> Thank you for your answer Steve Gabrilowitz, like i notice this code
creates a string with the error, but i didnt understand if stores the
string into a file, if it stores the error into a file, where i can find
the file ??? and does any error is stored into a new file ??? which means
that i will have several error files for several crashes ???
>
>
> Thank you again
>
>
>
> On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz wrote:
>>
>> Try something like this:
>>
>> package com.gabriloware.teslalib;
>>
>> import java.io.PrintWriter;
>> import java.io.StringWriter;
>>
>> import android.content.Context;
>> import android.content.Intent;
>> import android.os.Build;
>>
>> public class ExceptionHandler implements
>>  Thread.UncaughtExceptionHandler {
>>  private final Context myContext;
>>  private final String LINE_SEPARATOR = "\n";
>>
>>  private Tesla MyTesla=null;
>>
>>  public ExceptionHandler(Context context) {
>>  myContext = context;
>>  }
>>
>>  public void uncaughtException(Thread thread, Throwable exception) {
>>  StringWriter stackTrace = new StringWriter();
>>  exception.printStackTrace(new PrintWriter(stackTrace));
>>  StringBuilder errorReport = new StringBuilder();
>>  errorReport.append(" CAUSE OF ERROR \n\n");
>>  errorReport.append(stackTrace.toString());
>>
>> /*
>>  errorReport.append("\n DEVICE INFORMATION ***\n");
>>  errorReport.append("Brand: ");
>>  errorReport.append(Build.BRAND);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("Device: ");
>>  errorReport.append(Build.DEVICE);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("Model: ");
>>  errorReport.append(Build.MODEL);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("Id: ");
>>  errorReport.append(Build.ID);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("Product: ");
>>  errorReport.append(Build.PRODUCT);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("\n FIRMWARE \n");
>>  errorReport.append("SDK: ");
>>  errorReport.append(Build.VERSION.SDK);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("Release: ");
>>  errorReport.append(Build.VERSION.RELEASE);
>>  errorReport.append(LINE_SEPARATOR);
>>  errorReport.append("Incremental: ");
>>  errorReport.append(Build.VERSION.INCREMENTAL);
>>  errorReport.append(LINE_SEPARATOR);
>>
>> */
>>  if (MyTesla==null)
>>  MyTesla = new Tesla(myContext);
>>  MyTesla.LogEvent("EXCEPTION",errorReport.toString());
>>
>>  Intent intent = new Intent(myContext, CrashActivity.class);
>>  intent.putExtra("error", errorReport.toString());
>>  myContext.startActivity(intent);
>>
>>
>>  android.os.Process.killProcess(android.os.Process.myPid());
>>  System.exit(10);
>>
>>  }
>>
>> }
>>
>>
>>
>> public class TeslaApplication extends Application {
>>
>>  public LogFragment Logger=null;
>>
>>  @Override
>>  public void onCreate() {
>>  super.onCreate();
>>  Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
>>  new Tesla(this).Init2();
>>
>>
>>  }
>>
>> ...
>>
>>
>> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  wrote:
>>>
>>> Hi everyone,
>>>
>>> I am new on developing android app and i have a problem.
>>>
>>> I have developed and app for restaurant order in android studio, which
communicates wit an Apache server to get the dishes, dish categories,
available tables, receipts and etc.
>>> I use php to get the data from the mysql and to store data from the
tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
>>> For me everything worked ok, in the emulator as well as in the tabet.
>>>
>>> I gave this app to an restaurant and they tell me that the app crashes
some time, without giving any error notification, it say just that the app
crashed and will restart.
>>> All the system works offline, without internet, just a local network.
>>>
>>> Now he question is, is there any way to keep somehow crash report in
the tablet and in the end after some day to get them ?
>>> I find out that in logcat i can get the crash report if i get it
exactly after the crash, the problem is that i cannot be there to get the
logcat file in that moment.
>>>
>>> Please any help
>>>
>>>
>>> Thank you in advance
>>>
>>> --
>>> You received this message because you are subscribed to the Google
Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
an email to android-developers+unsubscr...@googlegroups.com.
>>> To post to this group, send email to android-d...@googlegroups.com.
>>>
>>> Visit this group at https://groups.google.com/group/android-developers.
>>> To view this discussion on the web visit

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Chairi Kiourt
Thank you for your answer Steve Gabrilowitz, like i notice this code 
creates a string with the error, but i didnt understand if stores the 
string into a file, if it stores the error into a file, where i can find 
the file ??? and does any error is stored into a new file ??? which means 
that i will have several error files for several crashes ???


Thank you again

 

On Tuesday, November 8, 2016 at 7:53:04 PM UTC+2, Steve Gabrilowitz wrote:
>
> Try something like this:
>
> package com.gabriloware.teslalib;
>
> import java.io.PrintWriter;
> import java.io.StringWriter;
>
> import android.content.Context;
> import android.content.Intent;
> import android.os.Build;
>
> public class ExceptionHandler implements
>   Thread.UncaughtExceptionHandler {
>private final Context myContext;
>private final String LINE_SEPARATOR = "\n";
>
> private Tesla MyTesla=null;
>
>public ExceptionHandler(Context context) {
>   myContext = context;
>}
>
>public void uncaughtException(Thread thread, Throwable exception) {
>   StringWriter stackTrace = new StringWriter();
>   exception.printStackTrace(new PrintWriter(stackTrace));
>   StringBuilder errorReport = new StringBuilder();
>   errorReport.append(" CAUSE OF ERROR \n\n");
>   errorReport.append(stackTrace.toString());
>
> /*
>   errorReport.append("\n DEVICE INFORMATION ***\n");
>   errorReport.append("Brand: ");
>   errorReport.append(Build.BRAND);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("Device: ");
>   errorReport.append(Build.DEVICE);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("Model: ");
>   errorReport.append(Build.MODEL);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("Id: ");
>   errorReport.append(Build.ID);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("Product: ");
>   errorReport.append(Build.PRODUCT);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("\n FIRMWARE \n");
>   errorReport.append("SDK: ");
>   errorReport.append(Build.VERSION.SDK);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("Release: ");
>   errorReport.append(Build.VERSION.RELEASE);
>   errorReport.append(LINE_SEPARATOR);
>   errorReport.append("Incremental: ");
>   errorReport.append(Build.VERSION.INCREMENTAL);
>   errorReport.append(LINE_SEPARATOR);
>
> */
> if (MyTesla==null)
> MyTesla = new Tesla(myContext);
> MyTesla.LogEvent("EXCEPTION",errorReport.toString());
>
> Intent intent = new Intent(myContext, CrashActivity.class);
> intent.putExtra("error", errorReport.toString());
> myContext.startActivity(intent);
>
>
> android.os.Process.killProcess(android.os.Process.myPid());
> System.exit(10);
>
>}
>
> }
>
>
>
> public class TeslaApplication extends Application {
>
> public  LogFragment Logger=null;
>
> @Override
> public void onCreate() {
> super.onCreate();
> Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
> new Tesla(this).Init2();
>
>
> }
>
> ...
>
>
> On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  > wrote:
>
>> Hi everyone,
>>
>> I am new on developing android app and i have a problem.
>>
>> I have developed and app for restaurant order in android studio, which 
>> communicates wit an Apache server to get the dishes, dish categories, 
>> available tables, receipts and etc.
>> I use php to get the data from the mysql and to store data from the 
>> tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
>> For me everything worked ok, in the emulator as well as in the tabet.
>>
>> I gave this app to an restaurant and they tell me that the app crashes 
>> some time, without giving any error notification, it say just that the app 
>> crashed and will restart.
>> All the system works offline, without internet, just a local network.
>>
>> Now he question is, is there any way to keep somehow crash report in the 
>> tablet and in the end after some day to get them ?
>> I find out that in logcat i can get the crash report if i get it exactly 
>> after the crash, the problem is that i cannot be there to get the logcat 
>> file in that moment.
>>
>> Please any help
>>
>>
>> Thank you in advance 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> To post to this group, send email to android-d...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit 
>> 

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Chairi Kiourt
Thank you for your answer sardar khan, but like i noticed Firebase is 
something like an sdk, which i dont know to use, is there any 
example/tutorial about the crash report issues that i have ???

On Tuesday, November 8, 2016 at 7:52:50 PM UTC+2, sardar khan wrote:
>
> See FireBase Integration in android.
>
> On Tue, Nov 8, 2016 at 10:01 PM, Chairi Kiourt  > wrote:
>
>> Hi everyone,
>>
>> I am new on developing android app and i have a problem.
>>
>> I have developed and app for restaurant order in android studio, which 
>> communicates wit an Apache server to get the dishes, dish categories, 
>> available tables, receipts and etc.
>> I use php to get the data from the mysql and to store data from the 
>> tablet (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
>> For me everything worked ok, in the emulator as well as in the tabet.
>>
>> I gave this app to an restaurant and they tell me that the app crashes 
>> some time, without giving any error notification, it say just that the app 
>> crashed and will restart.
>> All the system works offline, without internet, just a local network.
>>
>> Now he question is, is there any way to keep somehow crash report in the 
>> tablet and in the end after some day to get them ?
>> I find out that in logcat i can get the crash report if i get it exactly 
>> after the crash, the problem is that i cannot be there to get the logcat 
>> file in that moment.
>>
>> Please any help
>>
>>
>> Thank you in advance 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Android Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to android-developers+unsubscr...@googlegroups.com .
>> To post to this group, send email to android-d...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/android-developers.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/android-developers/1764d4ab-7c54-48d8-95a3-40faab692b12%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/87c11eae-2d28-4b5d-b774-127274757618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread Steve Gabrilowitz
Try something like this:

package com.gabriloware.teslalib;

import java.io.PrintWriter;
import java.io.StringWriter;

import android.content.Context;
import android.content.Intent;
import android.os.Build;

public class ExceptionHandler implements
  Thread.UncaughtExceptionHandler {
   private final Context myContext;
   private final String LINE_SEPARATOR = "\n";

private Tesla MyTesla=null;

   public ExceptionHandler(Context context) {
  myContext = context;
   }

   public void uncaughtException(Thread thread, Throwable exception) {
  StringWriter stackTrace = new StringWriter();
  exception.printStackTrace(new PrintWriter(stackTrace));
  StringBuilder errorReport = new StringBuilder();
  errorReport.append(" CAUSE OF ERROR \n\n");
  errorReport.append(stackTrace.toString());

/*
  errorReport.append("\n DEVICE INFORMATION ***\n");
  errorReport.append("Brand: ");
  errorReport.append(Build.BRAND);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("Device: ");
  errorReport.append(Build.DEVICE);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("Model: ");
  errorReport.append(Build.MODEL);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("Id: ");
  errorReport.append(Build.ID);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("Product: ");
  errorReport.append(Build.PRODUCT);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("\n FIRMWARE \n");
  errorReport.append("SDK: ");
  errorReport.append(Build.VERSION.SDK);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("Release: ");
  errorReport.append(Build.VERSION.RELEASE);
  errorReport.append(LINE_SEPARATOR);
  errorReport.append("Incremental: ");
  errorReport.append(Build.VERSION.INCREMENTAL);
  errorReport.append(LINE_SEPARATOR);

*/
if (MyTesla==null)
MyTesla = new Tesla(myContext);
MyTesla.LogEvent("EXCEPTION",errorReport.toString());

Intent intent = new Intent(myContext, CrashActivity.class);
intent.putExtra("error", errorReport.toString());
myContext.startActivity(intent);


android.os.Process.killProcess(android.os.Process.myPid());
System.exit(10);

   }

}



public class TeslaApplication extends Application {

public  LogFragment Logger=null;

@Override
public void onCreate() {
super.onCreate();
Thread.setDefaultUncaughtExceptionHandler(new ExceptionHandler(this));
new Tesla(this).Init2();


}

...


On Tue, Nov 8, 2016 at 12:01 PM, Chairi Kiourt  wrote:

> Hi everyone,
>
> I am new on developing android app and i have a problem.
>
> I have developed and app for restaurant order in android studio, which
> communicates wit an Apache server to get the dishes, dish categories,
> available tables, receipts and etc.
> I use php to get the data from the mysql and to store data from the tablet
> (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
> For me everything worked ok, in the emulator as well as in the tabet.
>
> I gave this app to an restaurant and they tell me that the app crashes
> some time, without giving any error notification, it say just that the app
> crashed and will restart.
> All the system works offline, without internet, just a local network.
>
> Now he question is, is there any way to keep somehow crash report in the
> tablet and in the end after some day to get them ?
> I find out that in logcat i can get the crash report if i get it exactly
> after the crash, the problem is that i cannot be there to get the logcat
> file in that moment.
>
> Please any help
>
>
> Thank you in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/android-developers/1764d4ab-7c54-48d8-95a3-
> 40faab692b12%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on 

Re: [android-developers] How to keep crash report of android app

2016-11-08 Thread sardar khan
See FireBase Integration in android.

On Tue, Nov 8, 2016 at 10:01 PM, Chairi Kiourt  wrote:

> Hi everyone,
>
> I am new on developing android app and i have a problem.
>
> I have developed and app for restaurant order in android studio, which
> communicates wit an Apache server to get the dishes, dish categories,
> available tables, receipts and etc.
> I use php to get the data from the mysql and to store data from the tablet
> (Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
> For me everything worked ok, in the emulator as well as in the tabet.
>
> I gave this app to an restaurant and they tell me that the app crashes
> some time, without giving any error notification, it say just that the app
> crashed and will restart.
> All the system works offline, without internet, just a local network.
>
> Now he question is, is there any way to keep somehow crash report in the
> tablet and in the end after some day to get them ?
> I find out that in logcat i can get the crash report if i get it exactly
> after the crash, the problem is that i cannot be there to get the logcat
> file in that moment.
>
> Please any help
>
>
> Thank you in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/android-developers/1764d4ab-7c54-48d8-95a3-
> 40faab692b12%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/CABHzXAQAy8xA%2BNyesvVf1SJ0bSm3Q-3fBOYqboHmsfds%2B3R-Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to keep crash report of android app

2016-11-08 Thread Chairi Kiourt
Hi everyone,

I am new on developing android app and i have a problem.

I have developed and app for restaurant order in android studio, which 
communicates wit an Apache server to get the dishes, dish categories, 
available tables, receipts and etc.
I use php to get the data from the mysql and to store data from the tablet 
(Android 5, Lenovo TAB 3 710F 7" ESSENTIAL).
For me everything worked ok, in the emulator as well as in the tabet.

I gave this app to an restaurant and they tell me that the app crashes some 
time, without giving any error notification, it say just that the app 
crashed and will restart.
All the system works offline, without internet, just a local network.

Now he question is, is there any way to keep somehow crash report in the 
tablet and in the end after some day to get them ?
I find out that in logcat i can get the crash report if i get it exactly 
after the crash, the problem is that i cannot be there to get the logcat 
file in that moment.

Please any help


Thank you in advance 

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1764d4ab-7c54-48d8-95a3-40faab692b12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.