Home screen widgets

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

Home screen widgets

Postby spirolateral » Tue Oct 28, 2008 5:38 pm

i was wondering if it's possible to create a custom widget that you can add to the home screen like the clock or the search box. if you press and hold the home screen you are given the option to add stuff to it, one section is widgets that lists the clock, search, etc. i'd like to know how to add a widget to that list.
spirolateral
Developer
Developer
 
Posts: 25
Joined: Tue Oct 14, 2008 5:15 am

Top

Postby MrSnowflake » Tue Oct 28, 2008 8:24 pm

Sorry, not possible, and it's too bad, as I really hoped we could make our own Widgets.
Someone at Google said they were looking at it, but as it would risk security breaches, it's not sure it will ever come.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby ppcinfo » Tue Nov 04, 2008 7:51 am

That is really too bad. I was hoping to create a widget that acted like a "home screen" or "today screen" for the windows mobile devices. Something that displayed upcoming appointments, tasks, unread email count, etc. I wonder if and when they will allow developers to make such widgets?
ppcinfo
ppcinfo
Junior Developer
Junior Developer
 
Posts: 14
Joined: Mon Nov 03, 2008 7:47 pm

Recompile Home

Postby Jondice » Sun Nov 09, 2008 12:13 am

Hi,

This is too bad. I'm a newbie with android, but one thing I'm wondering: the "Home" source is made available, but searching it for "Widgets" turns up nothing, so I suppose the ability to run Widgets is included in the android runtime itself?

Also doing a text search for "Google Search" over the entire SDK turned up nothing, which is the default text in the provided search bar, which means the source isn't even being included in the SDK. Is it available somewhere else?

Thanks for the help.
Jondice
Freshman
Freshman
 
Posts: 3
Joined: Sun Nov 09, 2008 12:06 am

Postby ppcinfo » Sun Nov 09, 2008 4:37 am

I was also told by a Google engineer that you can't create your own Widgets, yet. So hopefully sometime soon we will have that capability.
ppcinfo
ppcinfo
Junior Developer
Junior Developer
 
Posts: 14
Joined: Mon Nov 03, 2008 7:47 pm

Postby AndreySerj » Tue Nov 18, 2008 2:58 pm

Hi, Is there news about this issue ?
AndreySerj
Developer
Developer
 
Posts: 31
Joined: Wed Dec 26, 2007 9:57 am
Location: Minsk

Top

Postby Pagemech » Wed Dec 03, 2008 8:40 am

You probably can't add your widgets to the standard home screen, but you can make your own home screen by adding this to your manifest.xml:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <intent-filter>
  3.  
  4.     <action android:name="android.intent.action.MAIN" />
  5.  
  6.     <category android:name="android.intent.category.HOME" />
  7.  
  8.     <category android:name="android.intent.category.DEFAULT" />
  9.  
  10.     <category android:name="android.intent.category.MONKEY" />
  11.  
  12. </intent-filter>
  13.  
  14.  
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


You will have to install the application onto your device or the emulator and then restart it, then you'll be able to choose between the default home screen and your own implementation.

The drawback is that you'll have to implement the whole home screen instead of simply adding widgets.
Pagemech
Freshman
Freshman
 
Posts: 6
Joined: Thu May 08, 2008 12:34 pm

Postby AndreySerj » Wed Dec 03, 2008 8:47 am

2Pagemech: Thanks a lot :) I have already done it almost the same
AndreySerj
Developer
Developer
 
Posts: 31
Joined: Wed Dec 26, 2007 9:57 am
Location: Minsk

Postby Pagemech » Wed Dec 03, 2008 2:59 pm

No problem!
Another additional info:
If you want that your homescreen is always the default and that the system doesn't ask to choose between different home screens simply put it that way:

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <intent-filter android:priority="1">
  3.  
  4.     <action android:name="android.intent.action.MAIN" />
  5.  
  6.         <category android:name="android.intent.category.HOME" />
  7.  
  8.         <category android:name="android.intent.category.DEFAULT" />
  9.  
  10.         <category android:name="android.intent.category.MONKEY" />
  11.  
  12. </intent-filter>
Parsed in 0.001 seconds, using GeSHi 1.0.8.4


The difference to the XML above is android:priority="1". It seems that the default home screen has priority 0 and therefore setting the priority of your home screen to 1 is sufficient to force the usage of your home screen.
Pagemech
Freshman
Freshman
 
Posts: 6
Joined: Thu May 08, 2008 12:34 pm

Postby anindamaji » Thu Feb 26, 2009 2:43 pm

can you upload a project where an another widget (like clock in the default) has been displayed...
anindamaji
Freshman
Freshman
 
Posts: 2
Joined: Wed Feb 25, 2009 8:43 am
Location: India

Postby Emmanuel7 » Sun Mar 01, 2009 3:53 am

This is interesting, another home page where you can create your own home widget :
http://dxtop.wikidot.com/
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby Nemat » Fri Nov 27, 2009 10:09 am

Hi PageMech.....

I am doing the same in my application.But it still asks permission to choose between different Home Screen.what should I do?

Thanks in Advance
Nemat
Nemat
Experienced Developer
Experienced Developer
 
Posts: 62
Joined: Thu Aug 21, 2008 3:16 pm
Location: Jaipur

Postby henca » Sat Nov 28, 2009 10:16 pm

AndreySerj wrote:Hi, Is there news about this issue ?


Since Android 1.5 it is possible to write your own home screen widgets. There are some tutorials on the net with example codes. If you have cvs you can also get the source for a home screen widget from http://telenorkontant.sourceforge.net/

regards Henrik
User avatar
henca
Junior Developer
Junior Developer
 
Posts: 17
Joined: Sat Aug 15, 2009 8:59 pm
Location: Linköping, Sweden

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot], MSNbot Media and 11 guests