There are features like "telephony" that are supported only on phones, if you include them in your application manifest the tablet users will not be able to find the app in the Market. Google's solution to that is to deploy multiple APK under the same package.
~~~~~~~~~~~~~~~~~~~~~~~~
PHONES (deploy first):
It is OK to include android:largeScreens="true" for phones as you will see at the end.
~~~~~~~~~~~~~~~~~~~~~~~~
TABLETS (deploy second):
If you want the app to show on the Android market for tablets, deploy another APK with API-Level 9 ( android:largeScreens="true", android:minSdkVersion="9")
DO NOT include, or try android:required="false" android:name="android.hardware.telephony":
After deployment you will see 2 versions on your developer's dashboard:
This notebook is a collection of code snippets and technical "how to" instructions.
Search This Blog
XML file design and formatting
by: Uki D. Lucas
It is well know that XML files are larger and therefore slower that JSON, however with careful design they don't have to be so. Remember the rule:
1) it the tag repeats only once then it should be converted to an attribute, for example:
- name, latitude, longitude, etc.
2) shorten the tag names, but don't go to far so it is still human readable
3) compress (zip) XML files when transferring them over a network
Formatting:
1) put each attribute on separate line, white space does not cost when compressed
2) extend line length to at least 120 characters for readability, your window size most likely allows for more
1) it the tag repeats only once then it should be converted to an attribute, for example:
- name, latitude, longitude, etc.
2) shorten the tag names, but don't go to far so it is still human readable
3) compress (zip) XML files when transferring them over a network
Formatting:
1) put each attribute on separate line, white space does not cost when compressed
2) extend line length to at least 120 characters for readability, your window size most likely allows for more
related #tags:
Best Practices,
Eclipse,
JSON,
XML
Still comparing iPhone to Android?
by: Uki D. Lucas
Disclaimer: I ALWAYS have BOTH iPhone and Android on me, I use both. I had 3 iPhones and several Android models including tablets of both OS.
Apple has a beautiful consistency of the product, and the hardware is just yummy, but as with superior breeds of the animals, does not matter how well groomed and "purified", the diversity and evolution eventually wins as the environment constantly changes.
An Example of such changes is that I mostly write my blogs from the phone, I never thought I will be doing it, but it is convenient especially with the Google Blogger app. I would not be able to type the long articles on virtual keyboard, so I rather use an OFFSHOOT of the mobile evolutionary tree, Motorola Droid2. I don't have much love for that particular phone, but I got it for free, no argument there.
Maybe in few months I will have different needs and I will choose another model.
So today, the only way you would convince me to switch my DROID2 for iPhone is if I could sell it on eBay and buy a newer, better Android phone (with keyboard).
For me, there is no comparison, iPhone loose hands down on daily basis.
Couple of examples:
I cannot live without the above, and hundred other features users of iOS never heard of.
Let me know what features of each platform you find a must-have.
Apple has a beautiful consistency of the product, and the hardware is just yummy, but as with superior breeds of the animals, does not matter how well groomed and "purified", the diversity and evolution eventually wins as the environment constantly changes.
An Example of such changes is that I mostly write my blogs from the phone, I never thought I will be doing it, but it is convenient especially with the Google Blogger app. I would not be able to type the long articles on virtual keyboard, so I rather use an OFFSHOOT of the mobile evolutionary tree, Motorola Droid2. I don't have much love for that particular phone, but I got it for free, no argument there.
Maybe in few months I will have different needs and I will choose another model.
So today, the only way you would convince me to switch my DROID2 for iPhone is if I could sell it on eBay and buy a newer, better Android phone (with keyboard).
For me, there is no comparison, iPhone loose hands down on daily basis.
Couple of examples:
- If you want to have an alarm app (check out our Shame Alarm app) on iPhone you have to start it and leave it in the foreground -- and that is only one of the many problems of iOS, Google solved it long time ago.
- I use desktop widgets on my phone all the time, iPhone may have them soon.
- Switching between running apps, I do it all the time bouncing between email and chat and browser and blogger.
- I type probably 3 hours a day on my phone, including my blogs, emails, chat, there is no keyboard on any iPhone
I cannot live without the above, and hundred other features users of iOS never heard of.
Let me know what features of each platform you find a must-have.
Current Mobile OS share in USA
by: Uki D. LucasUsing stereo 3.5mm jack to communicate with IR remote
by: Uki D. Lucas
I was thinking about making a universal 3.5mm jack device (IR and more).
This is not a new idea, versions of it has been around for 7 years, but it is still a cool project.
Griffin had something like that patented for several years, read this article, it is still cool. RedEye Mini has recently covered it commercially. Total Control seems to have Android version.
RedMote is providing Android source code and apk as well as few sample WAV files. The design is very cool:
Quoting from the article: "two IR LEDs mounted in reverse [..] each IR LED will emit half the signal/frequency (15~20Khz). Together they will reproduce the original IR frequency exactly like the original remote."
The optimal solution of course it to develop a sound generator and plug in the remote specifications.
Here is a listing of remote specifications.
I also think it would be cool to design Arduino board/shield that would plug in to 3.5mm jack and be able to receive:
It take time and effort to create tutorials, please support my efforts with a couple dollar donation, any amount will be greatly appreciated!
This is not a new idea, versions of it has been around for 7 years, but it is still a cool project.
Griffin had something like that patented for several years, read this article, it is still cool. RedEye Mini has recently covered it commercially. Total Control seems to have Android version.
RedMote is providing Android source code and apk as well as few sample WAV files. The design is very cool:
Here are the components needed as provided by RedMote:
Hackint0sh.org (Former Bender) is providing great schematics for the project:
Quoting from the article: "two IR LEDs mounted in reverse [..] each IR LED will emit half the signal/frequency (15~20Khz). Together they will reproduce the original IR frequency exactly like the original remote."
The optimal solution of course it to develop a sound generator and plug in the remote specifications.
Here is a listing of remote specifications.
I also think it would be cool to design Arduino board/shield that would plug in to 3.5mm jack and be able to receive:
- IR emitter for controlling AV equipment (and add some social sharing component to TV watching)
- IR proximity sensor to trigger stuff like alarm, or camera/voice recording
- Ultrasound Sonar for various distance detection
- and more..
Magnetic Card Reader
by: Uki D. Lucas
Here is a cool DIY project for couple of bucks worth of components:
http://members.cox.net/berniekm/card.html
http://members.cox.net/berniekm/card.html
Android: including HTML pages stored within the app
by: Uki D. Lucas
Let's say we have a "Welcome", or "Help" HTML page that we want to include in the app. We put it in the assets directory, I created subfolder there called html.
Now I can call:
Now I can call:
webView.loadUrl("file:///android_asset/html/index.html");
Square - Credit Card Reader
by: Uki D. LucasWhat's that? Micro iPod, toy tank, satellite dish? Not sure and I don't care as long as it has Android APIs. squareup.com
Subscribe to:
Posts (Atom)