public void messageBox(String title, String message) {
AlertDialog alertDialog;
alertDialog = new AlertDialog.Builder(MyActivity.this).create();
alertDialog.setTitle(title);
alertDialog.setMessage(message);
alertDialog.setButton("OK", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
alertDialog.show();
}
Friday, June 17, 2011
Making a message box in Android
Turns out that making a simple message box in Android is just complicated. So here's a very useful snippet:
Friday, May 27, 2011
Why Microsoft is going to dominate 50% of the mobile world in about 5 years
Microsoft nowadays looks like it's desperately trying to hold a grip on something. The recent acquisition of Skype, Windows Phone 7, and other things just come to show us how lost they are. They are even planning ARM support for Windows 8, something which they tried to avoid for a long time. Since the uprising power of the ARM processors, alongside the amazing power consumption, it just looks like their way out of the mud. It seems that they are decades away from Apple and Google, but they do not even realize how far ahead they are.
The Windows x86 platform is the most common operating system in the world today. Therefore, trillions of code lines in the world have been written and adjusted for this platform, and Windows 7 continues to be the primary, and probably most successful operating system today, especially in the enterprise world.
As of March 2011, more than 80% of the world's consumer devices are Windows powered - XP, Vista and 7. But how can this advantage be leveraged into the mobile world against Android and iOS? You'd obviously think that an ARM compatible, slim embedded operating system from Microsoft is the solution, and so do Microsoft. That's why Windows 8 is planned to be compatible with ARM. But the answer is much closer than anyone would expect.
The battle between ARM and Intel is emerging - ARM, from one side is trying to breach the high end CPU market, whereas Intel, using their Atom CPU are trying to compete in the mobile market. But up to now, Intel's new System-on-Chip - code named Silvermont, using their new Tri-gate transistor technology cuts down the power consumption in half, which makes it just good enough to manufacture smart-phones. By 2013, very power efficient smart-phones will be emerging with enough processing power and memory to run a fully fledged Windows 7 operating system, which is exactly what they need to leverage their advantage in the PC market. Once Windows 7 mobile phones will be available, they will start replacing desktops and laptops using docking stations and mobile modules, utilizing a mobile interface when on the go, or a normal desktop when docked. This use case is perfect for enterprise, where people need their laptops with them at all times, wherever they are, and would love saving the hassle of carrying around their laptop around.
The many users who use Android and iOS today, who still use a Windows based operating system, would prefer a Windows mobile phone, if they were good enough. But so far, Microsoft is losing this battle, and losing hard. Windows Phone 7, just like Android 2 and iOS will become obsolete, as Android 3 or Chrome OS from Google, OS X for mac and Windows 7/8 from Microsoft will take over the mobile market as well, once power efficient, small factor Atom CPUs will emerge, like Silvermont. The mobile operating systems will become history. Once this happens, the current operating system market share will start reflecting on the mobile devices, and will increase Microsoft's share to become at least 50% (and even up to 80%) of the mobile market.
The upcoming Windows 8 tablets and other mobile devices, based on ARM, which will probably start to emerge in the upcoming year is a step forward in terms of Windows 8, but the ARM support could only help Microsoft in taking over a larger share of the market. However, this is not the reason for their upcoming success - their success will emerge from the fact that Windows is the most commonly used OS today, running on the x86 platform.
Microsoft still has a long way to go. But the fact is, that their natural advantage will allow them to succeed in the mobile market, without the need to work hard, like Apple and Google. By 2016 or so, mobile platforms will be as fast as modern PCs, allowing everyone to have their handheld computer in their hands at all times, playing CPU intense computer games they recently installed, and using Outlook, Office and Visual studio at the same time.
Subscribe to:
Posts (Atom)