1. Good Meta TagsYour Title, Description and Keywords are very important within your Meta Tags. One this is for sure, make sure your title has some of your top keywords in it instead of “Welcome to my site”. Just this one little detail could increase your page ranking tremendously. See Brad Callen’s e-book to learn more about Meta tags and how to optimize them.2. Link exchangesOne economical SEO Test that can get you good results is through link exchanges (linking to and from other web sites). Based on what websites you’d like to exchange links with, this tool can even cost you absolutely nothing at all. Get a hold of the author or owner of the web site you want to have a link exchange with and let them know you’d like to exchange links with them. Make sure the sites are related to your subject matter, in other words don’t try to get an inbound link from a fishing web site if your site has to do with candle making. You’ll be surprised with the eventual spiking up of your page rank using this method. If you can get one-way inbound links to your site that will be even better.3. Write or obtain keyword-rich articlesWrite information-filled and keyword-rich articles. This is a crystal-clear way to make your Internet business more noticeable than ever. You can write your own articles and also get them from article directories that let you to post the articles on your web site as long as you do not delete the resource box or the author's byline. Make sure your articles are full of useful information and not just a copy and pasted sales letter. That tactic won’t help you at all and probably get your article flagged and deleted. If you think you can’t write or simply don’t have them time you can always hire a ghost write. One more thing, take those same articles and submit them to article directories just like this one. That will help you with “back links” and your article might even get picked up by other publishers who will submit your article to their web site, ezine etc. that will ultimately get you more traffic. The bottom line is your web site’s content will keep your visitors coming back and even referring people to it if it is worth the read.3. Organize your site navigationGiving your visitors easy steps in navigating your site is one way to make them feel comfortable while visiting your site. This can, in turn, better develop the flow of traffic to your website. Think about creating a site map for your web site Busby SEO Test.Search engine optimization is always changing but some things always stay the same. There are tons of ways to get you the top of search engines and yes even Google, but you must invest your time to learn what it takes to get your site there and take action right away. Some methods might cost you money but many are free like the above mentioned. Become a student of the game and get in the game and never stop learning.Frank Salinas is a professional home-based business owner through MLM and affiliate marketing. He has a passion for personal growth and helping others, especially those that are new to the industry. Visit his web site to view valuable tools and resources and also some of the top home-based businesses: http://franksalinas.com.
Wednesday, January 28, 2009
SEO The Cheap And Smart Way
1. Good Meta TagsYour Title, Description and Keywords are very important within your Meta Tags. One this is for sure, make sure your title has some of your top keywords in it instead of “Welcome to my site”. Just this one little detail could increase your page ranking tremendously. See Brad Callen’s e-book to learn more about Meta tags and how to optimize them.2. Link exchangesOne economical SEO Test that can get you good results is through link exchanges (linking to and from other web sites). Based on what websites you’d like to exchange links with, this tool can even cost you absolutely nothing at all. Get a hold of the author or owner of the web site you want to have a link exchange with and let them know you’d like to exchange links with them. Make sure the sites are related to your subject matter, in other words don’t try to get an inbound link from a fishing web site if your site has to do with candle making. You’ll be surprised with the eventual spiking up of your page rank using this method. If you can get one-way inbound links to your site that will be even better.3. Write or obtain keyword-rich articlesWrite information-filled and keyword-rich articles. This is a crystal-clear way to make your Internet business more noticeable than ever. You can write your own articles and also get them from article directories that let you to post the articles on your web site as long as you do not delete the resource box or the author's byline. Make sure your articles are full of useful information and not just a copy and pasted sales letter. That tactic won’t help you at all and probably get your article flagged and deleted. If you think you can’t write or simply don’t have them time you can always hire a ghost write. One more thing, take those same articles and submit them to article directories just like this one. That will help you with “back links” and your article might even get picked up by other publishers who will submit your article to their web site, ezine etc. that will ultimately get you more traffic. The bottom line is your web site’s content will keep your visitors coming back and even referring people to it if it is worth the read.3. Organize your site navigationGiving your visitors easy steps in navigating your site is one way to make them feel comfortable while visiting your site. This can, in turn, better develop the flow of traffic to your website. Think about creating a site map for your web site Busby SEO Test.Search engine optimization is always changing but some things always stay the same. There are tons of ways to get you the top of search engines and yes even Google, but you must invest your time to learn what it takes to get your site there and take action right away. Some methods might cost you money but many are free like the above mentioned. Become a student of the game and get in the game and never stop learning.Frank Salinas is a professional home-based business owner through MLM and affiliate marketing. He has a passion for personal growth and helping others, especially those that are new to the industry. Visit his web site to view valuable tools and resources and also some of the top home-based businesses: http://franksalinas.com.
Wednesday, January 21, 2009
Weight Loss Motivation
Other ways you are able to motivate yourself is by making sure that you plan your meals ahead of time, this is essential when going shopping. Always make sure you have in mind what you will be eating for your main meals and try to make this a variation. Going out with a list in hand will make sure that you don’t pick unhealthy foods from the shelf.Make a list for yourself of all the reasons and benefits that you are dieting, this list should be printed out and stuck around the house where you can clearly see it in those times that motivation is lacking. When on a diet everyone will have bad days and these are the times when you need to bring back your focus and instead of worrying about the bad think if all the good and what you have achieved so far. If you do stray then don’t beat yourself up too much but instead get right back on track.
Tuesday, January 20, 2009
Avoiding memory leaks
Android applications are, at least on the T-Mobile G1, limited to 16 MB of heap. It's both a lot of memory for a phone and yet very little for what some developers want to achieve. Even if you do not plan on using all of this memory, you should use as little as possible to let other applications run without getting them killed. The more applications Android can keep in memory, the faster it will be for the user to switch between his apps. As part of my job, I ran into memory leaks issues in Android applications and they are most of the time due to the same mistake: keeping a long-lived reference to a Context.
On Android, a Context
is used for many operations but mostly to load and access resources. This is why all the widgets receive a Context
parameter in their constructor. In a regular Android application, you usually have two kinds of Context
, Activity and Application. It's usually the first one that the developer passes to classes and methods that need a Context
:
@Override
protected void onCreate(Bundle state) {
super.onCreate(state);
TextView label = new TextView(this);
label.setText("Leaks are bad");
setContentView(label);
}
This means that views have a reference to the entire activity and therefore to anything your activity is holding onto; usually the entire View hierarchy and all its resources. Therefore, if you leak the Context
("leak" meaning you keep a reference to it thus preventing the GC from collecting it), you leak a lot of memory. Leaking an entire activity can be really easy if you're not careful.
When the screen orientation changes the system will, by default, destroy the current activity and create a new one while preserving its state. In doing so, Android will reload the application's UI from the resources. Now imagine you wrote an application with a large bitmap that you don't want to load on every rotation. The easiest way to keep it around and not having to reload it on every rotation is to keep in a static field:
private static Drawable sBackground;
@Override
protected void onCreate(Bundle state) {
super.onCreate(state);
TextView label = new TextView(this);
label.setText("Leaks are bad");
if (sBackground == null) {
sBackground = getDrawable(R.drawable.large_bitmap);
}
label.setBackgroundDrawable(sBackground);
setContentView(label);
}
This code is very fast and also very wrong; it leaks the first activity created upon the first screen orientation change. When a Drawable is attached to a view, the view is set as a callback on the drawable. In the code snippet above, this means the drawable has a reference to the TextView
which itself has a reference to the activity (the Context
) which in turns has references to pretty much anything (depending on your code.)
This example is one of the simplest cases of leaking the Context
and you can see how we worked around it in the Home screen's source code (look for the unbindDrawables()
method) by setting the stored drawables' callbacks to null when the activity is destroyed. Interestingly enough, there are cases where you can create a chain of leaked contexts, and they are bad. They make you run out of memory rather quickly.
There are two easy ways to avoid context-related memory leaks. The most obvious one is to avoid escaping the context outside of its own scope. The example above showed the case of a static reference but inner classes and their implicit reference to the outer class can be equally dangerous. The second solution is to use the Application
context. This context will live as long as your application is alive and does not depend on the activities life cycle. If you plan on keeping long-lived objects that need a context, remember the application object. You can obtain it easily by calling Context.getApplicationContext() or Activity.getApplication().
In summary, to avoid context-related memory leaks, remember the following:
- Do not keep long-lived references to a context-activity (a reference to an activity should have the same life cycle as the activity itself)
- Try using the context-application instead of a context-activity
- Avoid non-static inner classes in an activity if you don't control their life cycle, use a static inner class and make a weak reference to the activity inside. The solution to this issue is to use a static inner class with a WeakReference to the outer class, as done in ViewRoot and its W inner class for instance
- A garbage collector is not an insurance against memory leaks
Note: This article was originally posted on my personal blog.
Thursday, January 15, 2009
start a business without capital
All business started from an idea which is then sold. So, we already have a home business idea is good, although not yet have the capital, we can sell the idea to our business and made money. Bill Gates, Microsoft emperor's kingdom, also started its business with a capital idea.After the drop out of Harvard, Bill Gates has to dare to dream can become a business rival IBM. This dream so that he continues to produce fertilizer courage to act. With this courage, Bill Gates briliannya sell the idea that offers business solutions in the field of information technology to a variety of investors, until finally he is able to support adequate funding to start businesses.Partnership.
If we have the skills, but does not have the money, why do not we partner with people who have money, but does not have the courage and skills that we have. Business strategy with the principles of cooperation win-win this fact has been applied by the perpetrators of the business menekuni the restaurant business. The team management and owners capital partner to run the business. The management team but not be paid given the benefit (in accordance with the agreed percentage) obtained from the restaurant business is run. Strategic partnerships such as this of course can also be implemented in different industries.
Pay at the Front.
The basis of a business is trust. If other people have put trust in us, it will be easier for us to do business with the capital knee. For instance, if we get an order to export goods to foreign countries, but we do not have enough money to produce goods that will be exported, we can try to ask the buyer to pay in advance part. The money we get this we can use to produce goods that have been ordered. To get the advance, we can also try to apply for export credit to the Trade in Services Bank, a sales contract with the show that has been signed to export some goods and other necessary documents. With the purchase of goods indicates the certainty of partners from abroad, will be easier for us to obtain credit facilities from banks. This is done by a lot of business to export goods overseas or importing goods from abroad.Intermediaries.
No capital is not a reason for us not to start a business. There are many ways that we can do to start a business with the capital knee. One of them is to act as mediator. Here we act as intermediaries between the producers (the goods) and consumers (buyers of goods). We can help people who have goods to sell goods to consumers. Then we can sell the goods at our place of business (with the consignment). After the goods sold, we can get results from the commission sold. The money we collect is successful, we can use to develop our business further. This is used by Charles Scwab with business pialangnya become a mediator in the sale of shares and securities other.Sell Expertise.
If we have the expertise and valuable experience in a field that rarely owned other people, we can try to sell our expertise and experience to help other people in doing their business. If we have the experience and expertise in the field of IT, we can offer our experience and expertise as a solution for business people. If we have the expertise in the field of English, we can offer document translation services, interpreting in seminars or business meetings, as well as English language training for business. If we have the expertise in music, we can offer our expertise to entertain other people in the various events, or to train other people to play a musical instrument that we can play. The business consultants, education consultants, artists, sportsman and professional use this strategy to achieve success.In principle, if we are determined to start a business, money is not the main capital. The need to belong is the courage, confidence and perseverance. Then, to start a business, we do not need to wait until the big capital accrued. We can get capital from various sources, among others, with the idea to sell, implement the management style of the restaurant, winning the trust business partners so that they are willing to pay in advance for services that we offer, or a broker to sell our expertise as a solution for other people. So, who says we can not start a business with a "knee capital"?
The Tips for Making Money Online Part 2
Busby SEO Test Make Money Online - Remember: The biggest reason most people don't make money online is that they never get started. A crucial step to make money online is driving targeted and qualified paying traffic to your website. The lesser the competition for the specific keyword, the higher the chance of your site to get to the top of the search engines and the chance to make money online is significantly increased. Another way to make money online is to become involved with email marketing or search engine marketing. With today's technologies, all you need to make money online is an 'interest', like a hobby, a skill, a passion, or a just general topic that you have interest or expertise in.Traffic / KeywordYour need to have good traffic to make money online an in order to do that, you need to know which keywords to use as the best. Once you have them, you also need to know if those keywords are working for you, or if you will need to tweak them to get better results. So, keywords are a great topic to understand. You need to become a member of famous Directory like Google and Yahoo. Using service of Google called Adsense, you have to add your ads, details or article related to keywords in the content of your site for example “Make Money Online”.
Then you search on Google for "Make Money Online" search term and see how many websites are competing on the keywords. For every click thru, you will make some pennies depending on the keywords. Some keywords might give you higher rank than the others. Your site's ranking on the search engines will depend on how optimized it is with the keywords you choose and the number of competition it has. Good keywords are the key to any good internet business marketing campaign as can be seen below. The better the keywords chosen the more money you will make online.
Search EngineYahoo and Google are the top two sites where most of the web searches come from. Yahoo's directory, the Google Directory, and the Open Directory Project (dmoz) are web directories -- essentially subject indices. Search engine traffic is the one referred by search engine result page (SERP) like Google or Yahoo. Experts estimate that Google account for 45% of the searches while Yahoo gets 30%. Google, Yahoo and MSN are the top search engines to date. Another way to make money online is to utilize an auction website such as Ebay or Yahoo Auctions to sell unwanted merchandise that you own to others using the internet as a tool to do so. But it is only possible, if your website or blog is optimized for your visitors who are looking for quality information and for the search engines. I recommend advertising mainly with the larger, more reputable search engines to get the best traffic to your website.ConclusionSearch Engine is ideal for websites with thousands of web pages. As I said in the part 1 already that, in many ways, starting a make money online business is no different to starting an off line one but online is a lot easier than you think. Ways to make money online is the same as addition and bandage a search clamp and again heave without nook, knock. The key to make money online is knowing how and where to start. Today I know that the challenge for anyone trying to make money online is figuring out what opportunity can make a difference for him. Although generating online traffic is an important goal of any website, attention should always be directed to the very first and most important issue in website marketing: targeting online customers. In summary, I believe that to make money online is not that hard. by : Busby SEO Test
Tuesday, January 13, 2009
Why is my list black? An Android optimization
ListView is one of Android's most widely used widgets. It is rather easy to use, very flexible and incredibly powerful. ListView
can also be difficult to understand at times.
One of the most common issues with ListView
happens when you try to use a custom background. By default, like many Android widgets, ListView
has a transparent background which means yo can see through the default window's background, a very dark gray (#FF191919
with the current dark theme.) Additionally, ListView
enables the fading edges by default, as you can see at the top of the following screenshot; the first text item gradually fades to black. This technique is used throughout the system to indicate that the container can be scrolled.
The fade effect is implemented using a combination of Canvas.saveLayerAlpha() and the Porter-Duff Destination Out blending mode. This technique is similar to the one explained in Filthy Rich Clients and various presentations. Unfortunately, things start to get ugly when you try to use a custom background on the ListView
or when you change the window's background. The following two screenshots show what happens in an application when you change the window's background. The left image shows what the list looks like by default and the right image shows what the list looks like during a scroll initiated with a touch gesture:
This rendering issue is caused by an optimization of the Android framework enabled by default on all instances of ListView
(for some reason, I forgot to enable it by default on GridView
.) I mentioned earlier that the fade effect is implemented using a Porter-Duff blending mode. This implementation works really well but is unfortunately very costly and can bring down drawing performance by quite a bit as it requires to capture a portion of the rendering in an offscreen bitmap and then requires extra blending (which implies readbacks from memory.)
Since ListView
is most of the time displayed on a solid background, there is no reason to go down that expensive route. That's why we introduced an optimization called the "cache color hint." The cache color hint is an RGB color set by default to the window's background color, that is #191919 in Android's dark theme. When this hint is set, ListView
(actually, its base class View
) knows it will draw on a solid background and therefore replaces th expensive saveLayerAlpha()/Porter-Duff
rendering with a simple gradient. This gradient goes from fully transparent to the cache color hint value and this is exactly what you see on the image above, with the dark gradient at the bottom of the list. However, this still does not explain why the entire list turns black during a scroll.
As I said before, ListView
has a transparent/translucent background by default, and so all default Android widgets. This implies that when ListView
redraws its children, it has to blend the children with the window's background. Once again, this requires costly readbacks from memory that are particularly painful during a scroll or a fling when drawing happens dozen of times per second. To improve drawing performance during scrolling operations, the Android framework reuses the cache color hint. When this hint is set, the framework copies each child of the list in a Bitmap
filled with the hint value (this assumes that another optimization, called scrolling cache, is not turned off.) ListView
then blits these bitmaps directly on screen and because these bitmaps are known to be opaque, no blending is required. And since the default cache color hint is #191919
, you get a dark background behind each item during a scroll.
To fix this issue, all you have to do is either disable the cache color hint optimization, if you use a non-solid color background, or set the hint to the appropriate solid color value. This can be dome from code or preferably from XML, by using the android:cacheColorHint
attribute. To disable the optimization, simply use the transparent color #00000000
. The following screenshot shows a list with android:cacheColorHint="#00000000"
set in the XML layout file:
As you can see, the fade works perfectly against the custom wooden background. I find the cache color hint feature interesting because it shows how optimizations can make developers' life more difficult in some situations. In this particular case, however, the benefit of the default behavior outweighs the added complexity for the developer.
Note: this article was originally posted on my personal blog.
The Tips for Making Money Online (Part 1)
Busby SEO Test Money Online - In many ways, starting a make money online business is no different to starting an off line one. A make money online business is a lot easier than you think. This article has information on make money online business to make extra money online. One of the best ways to make money online is by simply selling information. The first concept you have to understand to make money online is this; your product has to be placed in front of people who are looking for it, making survey, linking service to your website and more (see part 2). The final free method to make money online is to use reward schemes such as paid surveys. And the thing you have to understand about being able to make money online is that you have to work at it.Surveys Surveys can help you earn an income from home. Here you search make money online business or minus or poster or darkness in make money doing online surveys is focused on make money taking online surveys. While Paid Surveys will not make you rich, it is a good way to generate cash flow especially if you are starting with nothing or have little or no technical skills. You can find others just by doing an Internet search for paid surveys. Try to find one that will be the most reliable and easiest when it comes to making money. You can surely make money or get high-ticket items when you join survey sites and take part in the surveys they send you. All survey sites are not fraud as conducting surveys is a legitimate economic activity. And last but not the least, keep in mind that you may not get rich with surveys but you can expect to see good money with them if you understand how surveys work and take precautions not to get scammed.
Links Links to sites to boost your education and increase your profits. Another option is to write a few free E-courses that people can subscribe to via an auto responder and weave the links into your article. Now, the really important thing is to not just have the ads running on your site, but make sure that you have referrer links and banners to each of your advertisers, as the above four all pay you when you successfully refer a new publisher or advertiser. The articles have links to an affiliate or partnership websites which allow making money online from the affiliate activities. Conclusion Make money online are lots easier than make a living out there. Make money online surveys is focused on order, meal and book which contains all of the free online paid survey make money fast at home because make money online business is the same as make money online business or again heat and label or toy sometime have as a result of make money online business sometime information and label. Anybody that promises you an easy, effortless way to make money online is not telling the truth. The easiest and fastest way to start an internet business and make money online is with affiliate programs. One of the best ways to make money online is to focus your energy for a month or two and establish a membership website for your chosen market.by Busby SEO Test
Monday, January 5, 2009
How Israel, Hamas define victory in Gaza
Tel Aviv – Escalating a week-long assault against Hamas, Israel invaded Gaza over the weekend to stop the Islamist militants who continue to launch cross-border rocket attacks.
But what victory means for each side still remains vague. The Israeli military says the ground offensive is aimed at eliminating militant rocket-launching sites, destroying weapon caches, and pursuing fighters hiding in the crowded coastal strip.Will it be satisfied if the militants stop firing rockets or if it destroys the hundreds of tunnels to Egypt that make up Hamas's supply line? Some experts say Israel wants to force a more extensive cease-fire with Hamas, compel the creation of an international peacekeeping force in the coastal strip, or destroy the Islamist group altogether.
For Hamas, survival might be victory. It will be lauded across the Arab world if it can hold out against the region's strongest military."One of the most important things in this conflict between state and nonstate actors is what is the meaning of victory?" says Eitan Azani, a former Israeli Defense Forces colonel and a deputy director at the Institute for Counter Terrorism at the Interdisciplinary Center in Herzliya. "A lot of people from [Hamas] dying? A collapse? Or most of the operational capability destroyed? This is up for debate. We are in a very complicated situation."In the 2006 Lebanon war, the Shiite militant group Hezbollah showed the world it could not only survive Israel's superior firepower but that it could confront them on the battlefield. Israel withdrew from the 34-day war with Hezbollah claiming a "divine victory."So far, Hamas has succeeded in stirring up regional and domestic sympathy under the Israeli pummeling during the first week in the war. But as the fighting continues, the militant group risks seeing its fighting force quickly degraded."There may be a push to unseat its hold on Gaza," says Nicolas Pelham, a regional analyst for the International Crisis Group. "It still appears to have retained authority and control in Gaza. There's no internal forces seeking to challenge Hamas."In the first day of the ground war, Palestinian health authorities reported that 30 Gazans had been killed in the fighting, many of them civilians, according to news wires. An Israeli military spokesperson said that one Israeli soldiers had died in the fighting and three were seriously wounded. Since the operation began on Dec. 27, at least 500 Palestinians have been killed. The United Nations estimates that at least 100 of the dead are civilians.On Sunday, human rights organizations warned of a burgeoning humanitarian crisis in the Gaza Strip. As a result of the fighting, Gaza City and its main medical center, Shiffa Hospital, have been left without electricity. More than 1 out of every 3 residents are without water and sewage is running in the streets, according to Gisha, an Israeli human rights group.The ground invasion comes just as international mediators are arriving to the region to begin brokering a cease-fire that is believed to be the seldom-mentioned endgame for both sides."The ground action that we began last night, as part of the overall operation, is designed to establish our aspiration to change the security reality in the south," Israeli Prime Minister Ehud Olmert told the Israeli cabinet, according to a statement. "It cannot be that the home front will be subject to attack and a daring, strong and well-trained military does not defend it."Though Israel has struck at hundreds of targets across the Gaza Strip, it has yet to seriously injure Hamas's fighting force, the Izz ed-Din al Qassam Brigades."The main risk for Israel is that it will drag out into a full occupation of the Gaza Strip," says Shlomo Brom, the former head of the army's planning branch. "If we will have very few casualties in this operation, it may lead some to say why don't we topple Hamas?"Despite the offensive, Palestinian militants were able to fire about 30 rockets into southern Israel Sunday, according to the Israeli army. Since the offensive began, militants have fired hundreds of rockets into Israel, killing three civilians. Israel said its air force hit 15 targets across Gaza on Sunday.The Qassam wing predicted that the Israeli soldiers would fall prey to the "trap" laid by the Islamist militants."The Zionist enemy will be surprised and will regret carrying out such an operation at such a heavy price," the organization said in a statement Saturday. "Our militants are waiting patiently to confront the soldiers face to face."The start of the ground operation comes on the eve of stepped-up international efforts to prod a cease-fire. Representing the European Union's presidency, Czech Foreign Minister Karel Schwarzenberg, is planning to visit Israel and French President Nicholas Sarkozy is scheduled to arrive Monday.Much of Israel's firepower has been focused on destroying Gaza tunnels that are a channel for missiles and consumer goods into the strip. Shutting down the free flow of weapons trade over the border figures as one of the major goals of the operation, according to analysts. But it is far from certain who will enforce the closure of the tunnels when Israel leaves.The nine mile-long Gaza-Egypt frontier has long been crisscrossed by a network of tunnels. The Gaza assault has included several air force sorties in which "bunker buster" bombs were dropped on the area, exploding underground and sending out shockwaves designed to collapse the secret passages. "The issue of rearming is fundamental. We want to prevent Hamas from being rearmed like Hezbollah was after the Lebanon war," a senior Israeli official said.Palestinians in northern and eastern Gaza said that they can hear the sounds of the Israeli tanks and armored vehicle engines entering Gaza.Kamel Kafarna, a resident of the northern Gaza village of Beit Hanoun, says Israeli forces are in the fields outside of the village, but haven't entered the residential area. His family of four is running low on flour and wheat, and has run out of cooking gas. But the engineering teacher says he hasn't left his house for three days for fear of getting caught in the crossfire."It's crazy. The bullets and rockets are flying over our heads," says Mr. Kafarna, who was reached by phone. "Most of the civilians I believe were killed by mistake. And you don't know if you are going to be the next mistake."source : News Yahoo
Can I use this Intent?
Android offers a very powerful and yet easy to use tool called intents. An intent can be use to turn applications into high-level libraries and make code re-use something even better than before. The Android Home screen and AnyCut use intents extensively to create shortcuts for instance. While it is nice to be able to make use of a loosely coupled API, there is no guarantee that the intent you send will be received by another application. This happens in particular with 3rd party apps, like Panoramio and its RADAR intent.
While working on a new application, I came up with a very simple way to find out whether the system contains any application capable of responding to the intent you want to use. I implemented this technique in my application to gray out the menu item that the user would normally click to trigger the intent. The code is pretty simple and easy to follow:
/**
* Indicates whether the specified action can be used as an intent. This
* method queries the package manager for installed packages that can
* respond to an intent with the specified action. If no suitable package is
* found, this method returns false.
*
* @param context The application's environment.
* @param action The Intent action to check for availability.
*
* @return True if an Intent with the specified action can be sent and
* responded to, false otherwise.
*/
public static boolean isIntentAvailable(Context context, String action) {
final PackageManager packageManager = context.getPackageManager();
final Intent intent = new Intent(action);
List<ResolveInfo> list =
packageManager.queryIntentActivities(intent,
PackageManager.MATCH_DEFAULT_ONLY);
return list.size() > 0;
}
Here is how I use it:
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
final boolean scanAvailable = isIntentAvailable(this,
"com.google.zxing.client.android.SCAN");
MenuItem item;
item = menu.findItem(R.id.menu_item_add);
item.setEnabled(scanAvailable);
return super.onPrepareOptionsMenu(menu);
}
In this example, the menu is grayed out if the Barcode Scanner application is not installed. Another, simpler, way to do this is to catch the ActivityNotFoundException
when calling startActivity()
but it only lets you react to the problem, you cannot predict it and update the UI accordingly to prevent the user from doing something that won't work. The technique described here can also be used at startup time to ask the user whether he'd like to install the missing package, you can then simply redirect him to the Android Market by using the appropriate URI.
Note: this article was originally posted on my personal blog.
Saturday, January 3, 2009
The Lost World Found Through Google Earth
In the past, the adventurers must not squander the direction of the region to find a schedule yet. But now, scientists can rely on the online map service Google Earth to find new exploration areas.
Like a group of scientists from the British group called Kew Gardens. They successfully found the area running 'lost world that ', full of rare and exotic species owing to the help of Google Earth. 'Lost the World ' This form of the wilderness and not tereksplorasi Mozambique in the country, Mount Mabu in the region. Wild life experts previously ignored this region because difficult area and the war in Mozambique, which continues.
After the probe via Google Earth, the researchers come to the UK 'lost world that ' it. So far, in the short time they have found the exotic species such as dwarf chameleon, a new species of butterfly, giant snakes, and rare bird colonies.
Head of troops, said Jonathan Timberlake will be surprised many wild life that they find there. Previously, there has been no scientist who is visiting the area, even the name is also not in the conventional map. In fact, according to Jonathan, Mozambique is also most people do not realize the existence of the place. Lucky, scientists find this success via Google Earth.
search:
Google.com
Friday, January 2, 2009
Software All Submitter to search engines
In fact, there is! Introducing AllSubmitter by Can-Guru, the unique semi-automatic web site URL submission software that enables you to save time considerably combining speed and effectiveness of automatic submission with precision of manual submission!
AllSubmitter acts as an extended web browser complete with fields values memorizing, automatic form filling and capability to learn as you submit your web site to newer search engines and link archives. That is right: besides constantly updatedDownload:
http://www.webloganalyzer.biz/allsubmitter.exe
Thursday, January 1, 2009
Profil Christina Aguilera
Name: Christina Aguilera
Height: 5' 1½
Sex: F
Nationality: American
Birth Date: December 18, 1980
Birth Place: Staten Island, New York, USA
Profession: actress, musician
Education: Marshall Middle School in Wexford, Pennslyvania.
North Allegheny High School in Wexford, Pennsylvania (graduated in 1999)
Mickey Mouse Club
Rochester Area Elementary School in Rochester, Pennsylvania.
Husband/Wife: Jordan Bratman (music executive; dated since 2002; engaged on February 11, 2005; married on November 19, 2005 at the Staglin Family Vineyard in Northern California's Napa Valley)
Relationship: Jorge Santos (backup dancer; dated from 2000-2001)
Father: Fausto Wagner Xavier Aguilera (military officer; divorced)
Mother: Shelly Loraine Fidler (Irish-American, a Spanish teacher)
Sister: Rachel Aguilera (younger; born 1986)
Half Sister: Stephanie Kearns (younger)
Half Brother: Michael Kearns (younger; born 1996), Casey Kearns (younger)
Step Father: Jim Kearns (paramedic)
Son: Max Liron Bratman (born on January 12, 2008; father: Jordan Bratman)
15 Film Oscar Nomination For Visual Effects
Academy Awards will be held on 22 February 2009 at the Kodak Theater, Hollywood & Highland Center and broadcast by the ABC television network and running directly in more than 200 countries around the world.
1. Australia
2. The Chronicles of Narnia: Prince Caspian
3. Cloverfield
4. The Curious Case of Benjamin Button
5. The Dark Knight
6. The Day the Earth Stood Still
7. Hancock
8. Hellboy II: The Golden Army
9. The Incredible Hulk
10. Indiana Jones and the Kingdom of the Crystal Skull
11. Iron Man
12. Journey to the Center of the Earth
13. The Mummy: Tomb of the Dragon Emperor
14. Quantum of Solace
15. The Spiderwick ChroniclesSource: G2GLive
search:
Google.com