Pen input in Android tablet - android

I want to use pen in android tablet . I use pen and want to write text with pen. How can I develop the android application to be accept only pen input in EditText . Can I use pen in emulator ? Is there any usable API for this .?

As far as I know, only HTC supports a pen on some their android tablets (please someone correct me if I'm wrong, I may not be up-to-date on these things). Their pen can be used concurrently while you're touching the device because their screen can tell the difference between your finger and their special pen.
Here is a link to their pen api
http://www.htcdev.com/devcenter/tablet-pen
(free registration with their site is required I believe)
I believe they have an HTC SDK you can download with the AVD manager, but I just don't know if it comes with a special emulator for their pen api -- I haven't tried it yet.
Also other android tablets/phones can be used with pens, even if they're technically not made to support pens (but those pens are just special styluses that emulate the capacitive touch of your finger), so with those devices, the screen can not tell the difference between your fingers and that pen (so you can not assign them different functions which is definitely not as good).

Related

How to freeze an android tablet on specific app?

I'm new to android development and working on a project called Arithland ATM. Arithland is a competition and I want to make a real machine similar to ATM which work with the competition score instead of money. My question is how to program android tablet to run just specific app I made and people can't close the app and go inside the android and other parts of the tablet like setting or google apps or camera or ....
I know it is possible because I saw such tablets in H&M which is a clothes shopping and they used tablets for survey.
then I put the tablet inside a physical case and it becomes something similar to ATM. note that I don't want to use a core and monitor and keyboard and other hardware to make this, I just want to make it by android tablet because of some reasons.
EDIT:
I found this link very helpful: Set up Single-Purpose Devices
special thanks to #csm_dev
Look at Screen Pinning on Security in Settings.

How to develop basic graphics for Android, given limitations of emulators?

I'm developing a simple card game for Android and I'm facing the graphical problem. I found that a good option would be using AndEngine. However, it seems that is not supported neither by emulator nor by Android-x86, while it works fine on real device. Unfortunately I have only one real device but I need to test it with at least two devices (then I need the emulator or Virtual Machine). So, I have few options:
Develop a full version using AndEngine to be deployed on real device, while running a limited version with a GUI made of text and buttons on the emulator.
Develop it using only Android APIs
The only "graphical effects" I need are the following:
moving an image when discarding a card
partially cover a card with another card as I need to display 8 cards together
Then my question are:
which approach is better?
Would be actually possible to make it using only Android APIs (buttons, images, etc.)?
Is it possible to free paint images on a panel in the same way we do it in Java?
How about Surfaces, using the draw(Canvas canvas) method?

Android Phone & Tablet compatibility

Simple question,
I make an application for my phone (android froyo).
Is it will run on android froyo tablet ?
Or I must make some modification to make it work on tablet ?
Simple answer: It may run on the tablet - try.
Not so simple answer: It depends on whether you use some features of the phone and whether those features are available in your tablet. For example, if your tablet does not have GPS and you are developing location aware applications, that obviously is not going to work. Another thing to take care of would be the usability of the application. Your UI would most probably be designed with the phone's form factor in mind. That may not look exactly appealing on a large screen device like the tablet.
So long as you use the appropriate <supports-screen> tags in your Manifest.xml file, yes. However, I'd strongly suggest you go about making a tablet UI, because users don't like phone UIs stretched on a tablet screen. This document might help you with that.

change image of phone on emulator

I need to make a screencast of an app to present to a client, but need it to look better than the ugly red phone or the various other incarnations of the emulator. Is there a way to swap out that image?
Also would be great to get rid of the keyboard that displays next to it and make the window borders go way (since I have to capture it full screen on a mac, unfortunately, I can't crop it tight).
When you create an AVD, you can specify a different skin to use. Besides the ones available by default, there are also a bunch on the web for various devices. You can search for "[phone name] emulator skin" to find a variety, but here are a couple of examples:
Nexus One
Nexus S
The Motorola MOTODEV site (http://developer.motorola.com/docstools/tools/) has addons for nearly every one of our released phones. Registration is required. Most of the addons are full system images, which should work or you could extract out the skin for your own uses. There is a "skin only" addon for the upcoming XOOM tablet that uses Gingerbread for the runtime.
Good luck

How to determine if an Android device has a touchscreen?

I'm spending considerable time in making my UI to work with keyboard input only. But in the end I'm not sure whether I can rely on the assumption that Android devices all have touch screens.
Is there a way to determine if an Android device has a touch screen?
You should research the existing devices and read the Android Compatibility Definition Document (CDD) and decide for yourself.
I have spent some considerable time trying to figure out this problem for myself. The posters above are correct that Android already powers some non-touch devices and will power Google TV in the near future, but as it currently stands, the CDD specifically requires that ALL Android devices MUST have a touchscreen.
Basically, the Android Compatibility program was created to hedge against the sort of fragmentation issues you're worrying about now. It lists a bunch of requirements, and if a device does not meet those requirements, it does not get access to Android Market. These requirements include a touchscreen, wireless communication, bluetooth, a camera, and much more.
If you research those tablets and netbooks, you will find that not a single one carries the Android Market. Augen recently tried to pull a fast one with their new GENTOUCH 78 tablet, but had to rescind their claims that the tablet would carry Android Market after being shot down by the Android Compatibility Team.
So, if you are only distributing your app through Android Market, you have nothing to worry about until Google changes the CDD. But if you'd like to offer your app on other app stores or as a direct download, then you'll have to worry about your key mode navigation issues.
If it's any consolation, I have found that many, many apps have the exact same problem; they are impossible to use without a touchscreen. Many of them also have serious issues with focus and the soft keyboard. Sometimes the keyboard stays up when it should be hidden. Sometimes you can't get the keyboard to pop up no matter how many times you click on an EditText. IMO, the Android framework does not handle these things all that well.
Given all that, it will certainly be interesting to see how Google TV fits into all this. Will they update the CDD to be compatible with their set-top boxes? Will they use a different SDK and CDD for Google TV implementations? Will they ignore the Compatibility Program altogether when it comes to Google TV? Your guess is as good as mine.
Update:
It seems that someone at Google has finally come forward and admitted that Android is not ready to run on a tablet:
http://phandroid.com/2010/09/10/shocker-google-says-android-not-meant-for-tablets-in-its-current-state/
To me, this says that Google was not prepared for the accelerated adoption of the Android OS and has not adequately roadmapped the future of the platform. Supporting screens larger than 480x800 is barely possible, and Samsung was only able to do it by working closely with Google on the Galaxy Tab. So I'm not so sure we need to worry about non-touchscreen devices in the near future. They'll be here eventually, I'm sure, but when they do arrive we may see a separate app market just for those, or some altered filtering scheme on the existing market, a new CDD, who knows.
To me, this says that Google is still playing it by ear, and we'll just have to do the same.
All the phones so far have touch screens, but there is no promise that they must.
However there are lots of netbooks, notebooks, and soon to be TVs that have no touch screen.
However these devices have mice. From what I've seen, the mouse input gets pumped through the touch system so MouseDown is ACTION_DOWN, etc... (Don't know about right click though)
Are you targetting just the phones? Android is appearing on many devices including TV's I've no idea if new libs will be released to isolate parts of the devices from each other, but if you want a broader audience I'd suggest keeping the keyboard input available if you are
Google TV (GTV) is the most popular Android notouch device (as of the time this answer is composed). However, there are several devices that will call for notouch renderings if you have "notouch" resources (e.g. a directory like res/layout-notouch/ )
To accommodate notouch devices, made sure that focus will cause a visual selection indicator, and (for GTV) that keystroke listeners are in place for the directional-pad center button. Using default widgets and themes will often accomplish much of this automatically. If you make your own buttons, you need background 9-patches for focused and focused+pressed.
Running on a GTV is a good test environment to make sure that notouch works well, and GTV has an emulator now, though it runs only on Linux/x86.

Categories

Resources