LANDesk Support Tools – Android Edition (Demo)
This is my first real project written for Android. Yes, I wrote it in C# using Mono for Android.
Archive for the ‘Tablets’ Category.
This is my first real project written for Android. Yes, I wrote it in C# using Mono for Android.
Ok, so adding a menu that pops up from the bottom when the menu button is clicked is very common and quite easy to do.
Note: This assumes you have the Android SDK, Emulator, and Eclipse all working already.
Your project is now created.
<menu xmlns:android="http://schemas.android.com/apk/res/android"> id="@+id/menu_item_1" android:title="@string/menu_1"/> id="@+id/menu_item_2" android:title="@string/menu_2"/> <item android:id="@+id/menu_item_3" android:title="@string/menu_3"/> </menu>
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello">Hello World, HelloAllActivity!</string> <string name="app_name">HelloAll</string> <string name="menu_1">Menu 1</string> <string name="menu_2">Menu 2</string> <string name="menu_3">Menu 3</string> </resources>
You now have a menu and strings for each menu item.
Step 4 – Overload onCreateOptionsMenu
package org.rhyous; import android.app.Activity; import android.os.Bundle; public class HelloAllActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle inSavedInstanceState) { super.onCreate(inSavedInstanceState); setContentView(R.layout.main); } }
@Override public boolean onCreateOptionsMenu(Menu inMenu) { super.onCreateOptionsMenu(inMenu); getMenuInflater().inflate(R.layout.menu, inMenu); return true; }
You can now build your application and test that the menu pops up. However, the menu doesn’t do anything yet.
@Override public boolean onOptionsItemSelected(MenuItem inItem) { switch (inItem.getItemId()) { case R.id.menu_item_1: // Do something here return true; case R.id.menu_item_2: // Do something here return true; default: // Should never get here return false; }
Based on the item clicked, the appropriate code will run.
Hope you enjoyed this simple Android development example.
This post is a continuation of Writing Android apps in C# using MonoDroid.
Now that you have installed and configured MonoDroid and its prerequisites, you are ready to create your first project.
You now have a sample MonoDroid app.
Now that you have a sample MonoDroid app, learning to deploy it to an Android device and to test it is the next step.
You application should now be running in your Android emulator.
This is just a sample application that increments a counter and displays how many times you have click the button.
You are now ready to start writing your own application.
Xamarin has multiple Tutorials to help you get a little further along.
As C# developers, many of us would prefer to write Android Apps in C# as well. Novell had promised us MonoDroid, but we were quite concerned as to whether MonoDroid would ever be released when Novell was dismantled.
However, Xamarin spawned from the ashes like a phoenix to restore the viability of MonoDroid, restoring our hopes to writing in C# for the Android platform.
Though I am hopeful that MonoDroid will become popular allowing C# to be a commonly used language for Android devices, there is still some question as to whether Xamarin and its MonoDroid product will survive.
Xamarin is a new company and needs to survive first. Its business is to sell MonoDroid, which is not open source, but is a proprietary product. Unfortunately, MonoDroid may cost too much, preventing adoption among app developers. Xamarin requires a customer base and a continual adoption rate if it is going to survive. If the company folds, what is going to happen to the library and the apps that use it?
Yes and no.
Yes because anybody can use and develop with MonoDroid at no cost. It isn’t until you need to publish an app to the app store that you need to buy a license. You can use the MonoDroid trial for as long as you want. Here is a quote from the trial website. [2]
The evaluation version of Mono for Android does not expire, but enables development and testing against the Android Emulator only.
No, because you need to buy a license once either of the following become true:
So what is the cost of MonoDroid? Depends on if you buy Professional, Enterprise, or Enterprise Priority. On the Xamarin store, the following table can be found. To see it you have to add MonoDroid to your cart and then click the “Show product comparison” link. [1]
Professional | Enterprise | Enterprise Priority | |
---|---|---|---|
Deploy to your devices | |||
Publish to app stores | |||
Enterprise distribution | |||
Priority support queue | |||
Guaranteed response time | |||
License expiration | Never | Never | Never |
Update subscription | 1 Year | 1 Year | 1 Year |
License usage | Original User | Seat | Seat |
Price (USD) | $399 | $999 | $2,499 |
These costs are very low for business or enterprise customers who have C# developers and want to write Android apps. The cost of training a C# developer to develop apps for Android in Java may be far greater than training them to develop apps for Android using C# and buying a MonoDroid license.
Update
MonoDroid is not down to a one-click installer.
Here is the old method of Installing without the One-click Installer
MonoDroid is simple to set up. Xamarin has some simple steps that can be found on their web site. They have MonoDroid installation instructions for installing MonoDroid for use with any of three environments.
If you don’t have a Visual Studio license and you can’t afford one, then go with MonoDevelop because Visual Studio Express is noted to be enough [3].
However, the Visual Studio install is four simple steps.
These are very easy steps to complete, and I won’t repeat the steps here, but once you complete them, you are ready to start writing Android apps in C#.
Once you feel you have everything installed, click the following link to continue reading.
http://android.xamarin.com/Installation/Windows
I read this article today and found it very insightful.
ASUS Eee Pad Transformer tablet is a mixed bag
One of the biggest complaints about the tablet is the ability to type and this device eases that some, though not completely. One interesting quote, I am not sure if I agree with yet, but I have thought it myself is this:
A coworker who owns an iPad displayed some gadget envy when I first brought the Eee Pad Transformer to the office, but he also noted, “with the clam shell format, I think I’d end up using it mostly like that, and not like a tablet.” It turns out that this was a very astute observation, because my experience has been that I haven’t had much desire or reason to undock the tablet. This makes me wonder if tablet mania may not be a bit of a novelty.
I don’t know if I completely agree that tablets are a novelty. I remember the Palm Pilot was novelty that wore off and I am on the fence right now as to whether the iPad and devices such as the Motorola Xoom will end up as paper weights on peoples desk because typing and other uses just aren’t there and a laptop or desktop computer is desired. However, this ASUS Eee Pad Transformer tablet may be an important bridge to these technologies, something that didn’t exist in the Palm Pilot days, so problems that existed for the Palm Pilot and still exist in tablets today may have new solutions that allow the technology to go further.
I completely believe that the phones and tablets like the new T-Mobile 7″ Samsung tab are going to be continue to be huge industries and will not go away as the Palm Pilot did. However, will they continue to explode exponentially as many believe? Or is there a plateau coming?
I just reviewed the Motorola Xoom and it was a great tech toy. However, it wasn’t much more than a casual gaming tool. There is a crucial flaw that has yet to be solved with phones and tablets: Typing.
No matter how fast you can type on a phone or tablet, you will never type as fast as you can on a keyboard. Might there be a solution better than a keyboard that we just haven’t discovered yet…maybe…but even if we discover it will it work on a phone or tablet?
There are certain uses for a phone:
There are certain uses for a tablet
However, will the Laptop and Desktop be taken over by a tablet? What about 20″ to 27″ monitors? Some of use need so much real-estate we have multiple monitors. Here are using for a computer that a tablet does not solve. For those of you thinking of going 100% to phones and tablets, you may just want to hold on.
Here is a list of requirements and uses that are met by a desktop or laptop that the phone and tablet haven’t really solved yet.
Note: I am not going to repeat the items on the list for the smart phones and tables but be aware that the only feature the phone or tablet has that a desktop or laptop doesn’t have today is pocket portability.
We have been using desktops for three decades. Smart-phones and tablets are in their infancy. Many problems, including millions of custom problems for companies in all industries, have been solved using laptops and desktops. To replace desktops and laptops, these problems will have to be solved.
Many problems have solutions already.For example, blue-tooth and wireless technology can allow for peripherals but there are a lot of devices already out there that are not blue-tooth or wireless capable.
But another road block is in the way. Adoption.
Adoptions takes a long time. First the manufacturers have to adopt a technology, design new products, produce them, distribute them. Then consumers have to buy the new technology and if they already own an older version, that older version often has to go through its life cycle which can take a lot of years. I still have an HP LaserJet 5L from the late 90s that works perfectly. No, I am not going to invest in another laser printer until this one dies.
So will someone still be running a desktop or laptop with Windows XP/Vista/7 in 2020. Certainly. Will they probably own a smart phone or tablet as well. You bet!
I am writing this post to you from a Motorola Xoom.
Typing is definitely harder than with a keyboard yet much easier than from a phone.
It didn’t work out of the box. Apps wouldn’t download, and Google talk wouldn’t connect. I finally factory reset it and started over and it worked. We think you have to log in during the initial configuration to avoid this issue, but we didn’t try to dupe it.
It is working great now.