Home Screen Replacement

Put your problem here if it does not fit any of the other categories.

Home Screen Replacement

Postby klise17 » Thu Feb 24, 2011 11:38 am

Hi Guys, i am newbie here. I would like to ask or someone my provide tutorial, as i search it already i didnt get anything.

Let say i have application A. The first time i launched the application, of course it goes to main activity. What i want is when the user press the home button. it goes to alternative home screen which will redirect the same activity A again. so user will not see the original home screen. It will keep the application A running. if not mistaken service is like this, but the application has UI.Please provide me some notes or tutorial how to do that. Thank you
klise17
Freshman
Freshman
 
Posts: 4
Joined: Thu Feb 24, 2011 11:31 am

Top

Re: Home Screen Replacement

Postby blundell » Thu Feb 24, 2011 11:11 pm

User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Home Screen Replacement

Postby klise17 » Fri Feb 25, 2011 2:25 am

i use that one already, after i insert intent

if (Intent.ACTION_MAIN.equals(intent.getAction()) &&
!intent.hasCategory(Intent.CATEGORY_HOME)) {
///////////////////////////////////////////////////////////////////
//Toast.makeText(this, "SmackDown", Toast.LENGTH_SHORT).show();
Intent mIntent01 = new Intent();
mIntent01.setClassName("comwork.form.Form", "comwork.form.Form.MainActivity");
startActivity(mIntent01);
}

it error everytime i click the alternative URL button, any idea?
klise17
Freshman
Freshman
 
Posts: 4
Joined: Thu Feb 24, 2011 11:31 am

Re: Home Screen Replacement

Postby blundell » Fri Feb 25, 2011 9:53 am

You really need to learn to use LogCat and read the error your getting and tell us. This is the way you'll get the most help.

http://developer.android.com/guide/deve ... index.html
http://developer.android.com/guide/deve ... g-log.html
http://developer.android.com/guide/deve ... tml#logcat
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Home Screen Replacement

Postby klise17 » Mon Feb 28, 2011 2:49 am

its work fine already...:)

now i want to ask how to make the home screen alternative is the main one that will display when we boot the device?
klise17
Freshman
Freshman
 
Posts: 4
Joined: Thu Feb 24, 2011 11:31 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 15 guests