[android-beginners] Re: startActivity() crash...

2009-09-14 Thread Tikoze
Anyone? On Sep 2, 1:16 am, Tikoze janderson@gmail.com wrote: Roman, Ok, so I did a little more tinkering around with this and found the following: I can use PackageManager.getLaunchIntentForPackage(packageName) and I get a valid Intent to launch the activity.  However, no matter what

[android-beginners] Re: startActivity crash

2009-09-03 Thread tinyang
-beginners@googlegroups.com [mailto:android-beginn...@googlegroups.com] On Behalf Of htbest2000 Sent: Thursday, September 03, 2009 5:52 AM To: Android Beginners Subject: [android-beginners] Re: startActivity crash //startActivity(new Intent(Geotest.this, FieldGuide.class)); is this line cause crash

[android-beginners] Re: startActivity() crash...

2009-09-02 Thread Tikoze
Roman, Ok, so I did a little more tinkering around with this and found the following: I can use PackageManager.getLaunchIntentForPackage(packageName) and I get a valid Intent to launch the activity. However, no matter what flags I set (I have tried with both setFlags and addFlags methods) this

[android-beginners] Re: startActivity() crash...

2009-09-01 Thread Roman ( T-Mobile USA)
Justin, In case of the calendar application the activities activity android:name=MonthActivity android:label=@string/ month_view android:theme=@style/CalendarTheme / activity android:name=WeekActivity android:label=@string/ week_view

[android-beginners] Re: startActivity() crash...

2009-09-01 Thread Justin Anderson
Roman, Thank you very much for the feedback. I will look a little more into the PackageManager and PackageInfo classes and see what I can come up with. I think I saw some method in there that would return a launchable intent... Thanks, Justin

[android-beginners] Re: startActivity() crash...

2009-08-31 Thread Tikoze
Roman, I very well may be missing something here, but using taskInfo.topActivity still does not work (even if a taskInfo instance)... The problem, at least for the Calendar, is that taskInfo.topActivity.getClassName() does not return com.android.calendar.LaunchActivity It returns

[android-beginners] Re: startActivity() crash...

2009-08-27 Thread Tikoze
Roman, Thanks for looking into this issue. I spoke with another developer who has published a similar app on the market and was able to come up with a workaround for the problem. Is the solution you described specific to the calendar activity or can it be used in general? e.g. Can I use

[android-beginners] Re: startActivity() crash...

2009-08-27 Thread Tikoze
For anyone out there wondering what my workaround was, what you have to do is this (courtesy of the developer of Task Manager): - Get a list of the ActivityManager.RunningTaskInfo and ActivityManager.RecentTaskInfo objects. - ActivityManager has a baseIntent object - Both classes have an id that

[android-beginners] Re: startActivity() crash...

2009-08-27 Thread Roman ( T-Mobile USA)
Justin, For being able to start up a system application you need to find out the package name and the activity name. In case of Calendar app it is package=com.android.calendar activity android:name=LaunchActivity which results in the intent calendarIntent.setClassName

[android-beginners] Re: startActivity() crash...

2009-08-26 Thread Tikoze
Wow... it has been over a week since anyone other than me has responded to this post. No one has any ideas on what is wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To post to this

[android-beginners] Re: startActivity() crash...

2009-08-26 Thread Roman ( T-Mobile USA)
Justin, I verified your latest remark about the usage of the hard-coded example which causes an exception. Sorry, for the misleading information. I only guess that you are not allowed to start some of the systems applications in the way how you want to do it. For sure someone from the Android

[android-beginners] Re: startActivity() crash...

2009-08-26 Thread Roman ( T-Mobile USA)
Justin, With the following line of code you should be able to start up the calendar app calendarIntent.setClassName (com.android.calendar,com.android.calendar.LaunchActivity); -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this

[android-beginners] Re: startActivity() crash...

2009-08-20 Thread Tikoze
Roman, Thanks for your reply, but your suggestion for starting the activity does not fix the problem. I have changed the code to closely resemble yours. The only difference is that the package and class names are taken from ActivityManager.RunningTaskInfo.baseActivity.getPackageNamer () and

[android-beginners] Re: startActivity() crash...

2009-08-20 Thread Tikoze
Roman, I have also tried the hard-coded example you gave for launching the activity, but I get the same exception thrown. Thanks, Justin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Beginners group. To

[android-beginners] Re: startActivity() crash...

2009-08-19 Thread Roman ( T-Mobile USA)
Justin, The framework does a check on the permissions of the applications you are trying to start. In the case of how you are trying to start the activities the framework does not grant the permission. In general if you would be root or the owner of the calendar application (in this case its the

[android-beginners] Re: startActivity() crash...

2009-08-18 Thread Tikoze
Any ideas on why my app doesn't have permissions to launch the Calendar app when it is running but it does have permissions to launch virtually any other running app This bug is driving me crazy! Thanks in advance for any pointers/suggestions Justin

[android-beginners] Re: startActivity() crash...

2009-08-17 Thread Roman ( T-Mobile USA)
It might be helpful to see also the logcat trace of your crash. Have you tried to use the debugger or debug prints to find out where and when exactly your code crashes? -- Roman Baumgaertner Sr. SW Engineer-OSDC ·T· · ·Mobile· stick together The views, opinions and statements in this email are

[android-beginners] Re: startActivity() crash...

2009-08-17 Thread Roman ( T-Mobile USA)
It might be helpful to see also the logcat trace of your crash. Have you tried to use the debugger or debug prints to find out where and when exactly your code crashes? I am assuming that you have defined the following permission in your Manifest uses-permission

[android-beginners] Re: startActivity() crash...

2009-08-17 Thread Tikoze
Roman, For most applications, my code works and will actually switch applications. I have tested it on both 3rd party apps and built-in ones. For example, it will switch to Maps, Browser, Camera, and Home. I should have mentioned that in my original post. However, if I try to switch to

[android-beginners] Re: startActivity() crash...

2009-08-17 Thread Mark Murphy
Tikoze wrote: I do not know how to get the logcat trace of the crash, but will gladly post it if you can tell me how to get it. adb logcat, DDMS, or the DDMS perspective in Eclipse. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer

[android-beginners] Re: startActivity() crash...

2009-08-17 Thread Tikoze
Here is the logcat info. For some reason it is saying I do not have permission to launch the Calendar activity... What does it mean when it says the process record required null? Thanks, Justin -BEGIN LOGCAT INFO- 08-17 14:01:28.933: