Different AlarmClock applications for every phone?

by Thomas » Fri, 12 Mar 2010 01:50:07 GMT


Sponsored Links
 I have a widget that should launch the AlarmClock when its clicked.
After searching for a result it seems to me that every phone can have
its own AlarmClock-application, and that what I am trying to do isnt
really possible?

I have been using this for HTC Hero:
i.setClassName("com.htc.android.worldclock",
"com.htc.android.worldclock.WorldClockTabControl");
resolved = packageManager.resolveActivity(i,
PackageManager.MATCH_DEFAULT_ONLY);

And this if not HTC Hero:
i.setClassName("com.android.alarmclock",
"com.android.alarmclock.AlarmClock");
resolved = packageManager.resolveActivity(i,
PackageManager.MATCH_DEFAULT_ONLY);

This way I can check if the AlarmClock application is there. But now
it seems that the Nexus One has yet another application. Does anyone
know the component name and class for the Nexus AlarmClock?

I can see that this will be a growing list of checks, so is there a
better way?

Thomas

--



Different AlarmClock applications for every phone?

by Dianne Hackborn » Fri, 12 Mar 2010 02:49:14 GMT


 There is no standard alarm clock API in the platform.  Heck, some devices
may not even have one.




>


Sponsored Links


Different AlarmClock applications for every phone?

by Thomas Ermesjo » Fri, 12 Mar 2010 03:02:31 GMT


 So anyone with a Nexus One can check their logcat to see what the Alarmclock
classname for the nexus is?

Thomas

2010/3/11 Dianne Hackborn <hack...@android.com>


>>



Different AlarmClock applications for every phone?

by Mark Murphy » Fri, 12 Mar 2010 03:11:06 GMT


 


You should not be doing this. The alarm clock is an application, not
part of the SDK.

 http://www.androidguys.com/2009/12/14/code-pollution-reaching-past-the-sdk/ 

Some applications that may exist on Android have publicly documented
Intents, such as:

 http://developer.android.com/uide/appendix/g-app-intents.html 

The alarm clock is not one of them.

Now, if you want to allow the user to choose an application to launch,
by pulling up a list of available activities from the PackageManager,
that's perfectly reasonable.

But please don't go around hard-wiring class names in your code.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Android Programming Tutorials_ Version 2.0 Available!

--



Different AlarmClock applications for every phone?

by Thomas Ermesjo » Fri, 12 Mar 2010 03:30:18 GMT


 >Now, if you want to allow the user to choose an application to launch,

Thanks. Good idea.


2010/3/11 Mark Murphy <mmur...@commonsware.com>



>



Other Threads

1. Goldmine International .. A big scam ?

We have received so many comments regarding the authenticity of the biggest
SCAM which is GMI. It's our open challenge to all the current GMI investors
and GMI officials that if they would be able to answer these simple
questions with solid proofs the next day we will back off from blogging
against GMI. Following are some questions :-

see here
http://emailzz.blogspot.com/search/label/Goldmine%20International%20-%20A%20fraud

Apna Paisa

   - The World's Billionaires Women
2009<http://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/7ffx4Vm0ByA/worlds-billionaires-women-2009.html>
   - The Pakistan's Billionaires
2009<http://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/L1AgGaZHiMg/pakistans-billionaires-2009.html>
   - The World's Billionaires
2009<http://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/GGbxbPp6FnM/worlds-billionaires-2009.html>
   - 10 Tips On How To Get Rich
Fast<http://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/eGhnTPqKc9U/10-tips-on-how-to-get-rich-fast.html>
   - Top 5 AdSense
tips<http://feedproxy.google.com/%7Er/blogspot/iipK/%7E3/GIYofV2616Y/top-5-adsense-tips.html>


Apnay Sms

   - Vacancy Post-True
Friend.<http://feedproxy.google.com/%7Er/ApnaySms/%7E3/Ik_eO4RQQAs/vacancy-post-true-friend.html>
   - Frienship is a way
road<http://feedproxy.google.com/%7Er/ApnaySms/%7E3/YQSEhSlylms/frienship-is-way-road.html>
   - chalo tum hi mohabbat ki ibtada kr
do<http://feedproxy.google.com/%7Er/ApnaySms/%7E3/z8SJlEJCeXg/chalo-tum-hi-mohabbat-ki-ibtada-kr-do.html>
   - plz forgive
me<http://feedproxy.google.com/%7Er/ApnaySms/%7E3/NGrcCbulHBA/plz-forgive-me.html>
   - I Know How Angry You Are
...<http://feedproxy.google.com/%7Er/ApnaySms/%7E3/L2nqMZDyI8c/i-know-how-angry-you-are.html>


Jobs Opportunities

   - Latest Jobs from
newspapers<http://feedproxy.google.com/%7Er/JobsOpportunities/%7E3/u_eRERjtv9w/latest-jobs-from-newspapers.html>
   - SEND RESUME PHOTO RESEARCHER DUBAI The position is full time in a
   boutique photo library and press agency situated in Dubai. The job requires
   
researc<http://feedproxy.google.com/%7Er/JobsOpportunities/%7E3/EG2kUuDX2Kc/send-resume-photo-researcher-dubai.html>
   - EVENTS MANAGER
DUBAI<http://feedproxy.google.com/%7Er/JobsOpportunities/%7E3/7PXFFvJtjd8/events-manager-dubai.html>
   - ACCOUNT MANAGER
DUBAI<http://feedproxy.google.com/%7Er/JobsOpportunities/%7E3/kgau8fL3KOU/account-manager-dubai.html>
   - MOTIONS GRAPHICS DIRECTOR
DUBAI<http://feedproxy.google.com/%7Er/JobsOpportunities/%7E3/-3GNfCeLHAA/motions-graphics-director-dubai.html>

--~--~---------~--~----~------------~-------~--~----~

2. Repo Sync

Hi,

We have did repo sync using the following command.

$ repo init -u git://android.git.kernel.org/platform/manifest.git

How we can check the Android version and the Opencore version which we
downloaded?

Can someone help us in this regard?

Thanks&Regards,

--~--~---------~--~----~------------~-------~--~----~

3. can i load pdf url on webview?

4. How to record audio in wav format?

5. Does Android Messaging support EMS ?

6. Question for SDK developers - behavior of setFeatureInt

7. can anyone post me to an example of using ACTION_TIME_CHANGED or ACTION_DATE_CHANGED