Windowless application

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Windowless application

Postby jsegura » Mon Mar 02, 2009 8:28 am

Hello All,

I actually created an application that consists of an Activity who does all the job. The problem is that after launch this app, the screen toggles black for less than a second. I understand that is the layout defined for this Activity. There is any way to have an Activity without Layout? or.. There is any way to refactor my app for having this behaviour?
jsegura
Freshman
Freshman
 
Posts: 3
Joined: Mon Jan 12, 2009 1:39 pm

Top

Postby MrSnowflake » Mon Mar 02, 2009 9:29 am

So you mean, your app doesn't have any UI widgets?
You could try to make the app a service, or BroadcastReceiver, that might help.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby jsegura » Tue Mar 03, 2009 3:28 pm

Yes, but if I develop it as a service, as far as i know, I also have to launch an activity to send it an Intent for doing the job. Is it correct?
I don't know how I can achieve the behaviour I want.
jsegura
Freshman
Freshman
 
Posts: 3
Joined: Mon Jan 12, 2009 1:39 pm

Postby MrSnowflake » Tue Mar 03, 2009 5:09 pm

Yeah, you have to start the Service indeed, but you can have a BroadcastReceiver listen to BOOT_COMPLETED and have that start the service.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby jsegura » Tue Mar 03, 2009 5:55 pm

Yes, but as I can read in the reference..
Code: Select all


Broadcast Action: This is broadcast once, after the system has finished booting. It can be used to perform application-specific initialization, such as installing alarms. You must hold the RECEIVE_BOOT_COMPLETED permission in order to receive this broadcast.
Constant Value: "android.intent.action.BOOT_COMPLETED"


and I want to know when my app has clicked, not when the system has boot.

Ideas?
jsegura
Freshman
Freshman
 
Posts: 3
Joined: Mon Jan 12, 2009 1:39 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 6 guests