Or is there another possibility to debug my game, while it is in the
market?
How can I intercept all the errors in my code to find out how I can
solve them?

If nobody has an answer to this, I have to put a
try {
...
} catch (Exception e) { /* send this exception and line number over
internet to me */ }
on EVERY line of code?

For example:


        @Override
        public void onCreate(Bundle savedInstanceState) {

try {
                DisplayMetrics dm = new DisplayMetrics();
                getWindowManager().getDefaultDisplay().getMetrics(dm);
                Global.screen_width = dm.widthPixels;
                Global.screen_height = dm.heightPixels;
                Global.screen_width_factor = 320/Global.screen_width;
                Global.screen_height_factor = 480/Global.screen_height;
} catch (Exception e) { /* send exception - METRICS */ }
try {

                super.onCreate(savedInstanceState);
                requestWindowFeature(Window.FEATURE_NO_TITLE);
                this.getWindow().setFlags
(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                                WindowManager.LayoutParams.FLAG_FULLSCREEN );
} catch (Exception e) { /* send exception - window */ }
try {


                setContentView(R.layout.main);
} catch (Exception e) { /* send exception - contentview */ }
try {

                //Sound starten
                SharedPreferences prefs = getSharedPreferences("options", 0);
                Global.bgmusic=prefs.getBoolean("music", true);
                Global.soundeffects=prefs.getBoolean("soundeffects", true);
} catch (Exception e) { /* send exception - start sound */ }
try {


                b_start = (Button) findViewById(R.id.b_start);
                b_start.layout(120*Global.screen_width_factor,
55*Global.screen_height_factor,
                                (120+buttonwidth)*Global.screen_width_factor, 
(55+buttonheight)*
} catch (Exception e) { /* send exception - startbuttoncreated */ }


and so on....

or is there a better solution?

Greetings, Martin



On 3 Feb., 10:11, Martin <google-gro...@digle.de> wrote:
> Hi!
>
> I have a game in the market and with flurry analytics, I receive all
> my errors. Here are some of them:
>
>  01/31/10 01:47:39 PM PST        0       class
> java.lang.IllegalArgumentException       parameter must be a descendant of
> this view
>  02/02/10 12:40:41 PM PST        0       class
> java.lang.IllegalThreadStateException    Thread already started.
>  01/26/10 09:25:36 PM PST        0       class java.lang.NullPointerException
>                  1.0 (beta)      uncaught                Android
>  02/01/10 05:26:27 PM PST        0       class java.lang.OutOfMemoryError
> bitmap size exceeds VM budget    1.3 (beta)      uncaught                
> Android
>  01/29/10 10:23:10 AM PST        0       class java.lang.RuntimeException
> Adding window failed     1.0 (beta)      uncaught                Android
>  01/29/10 08:19:05 AM PST        0       class java.lang.RuntimeException
> Unable to start activity ComponentInfo{digle.de.LeonardFrog/
> digle.de.LeonardFrog.AHighscore}: java.lang.NullPointerException         1.0
> (beta)   uncaught                Android
>  01/27/10 01:09:35 AM PST        0       class java.lang.VerifyError
> digle.de.LeonardFrog.AHighscore          1.0 (beta)      uncaught             
>    Android
>
> I want to solve them but I need a logcat. There is the application
> "aLogcat" in the Market, which displays the logcat on the mobile, but
> I need the logcat of my users without telling them to download this
> app, because many people are lazy and won't do it. How can I get this
> logcat? Is there maybe a library, which sends me the logcat on error?
>
> Greetings, Martin

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to