Android Keyboard Handling Primer? - android

I have an book that's supposed to teach everything about Android programming. Unfortunately that book is missing so much information on fundamental stuff, it's not even funny. Its index doesn't even include an entry for onKeyDown()...
Can you recommend a resource that can teach a n00b like me how to handle keyboard events and possibly even understand how they work?
For example, how do I hook a function that I wrote to a key combination?
Does "key combination" exist in touchscreen-only Android devices?

I am not sure you can have key combinations in Android, as there are devices that only have single touch support (and no keyboards). Of course, there could have been changes. You may find some info in the android hardware compatibility reference.
For guidance you may look at the UI Events guide for Android. Also, you may try searching Google, or StackOverflow, as there are many helpful guides and tutorials for beginners. You just have to dig them out.

Related

Modeling a mobile app: How to go from the idea and design to classes and objects

I'm trying to develop my own application, I'm not too bad with code (Java, Objectif C...) nor design (Photoshop, illustrator... ).
But I always have the same problem, I never know how to go from my app Sketch and Storyboard to defining my objects and classes in code. It just makes a huge mess in my head.
I tried looking around but all the sites I can find describe the processus as Having an idea, creating a design, a storyboard, coding your app, publishing and marketing. But none explain how to go from the said storybord to the code or architectures of your code, thus not solving my problem.
As time passes it gets more annoying, I feel stuck :/.
Can you help me with any leads ?
Pretty please with the sugar on top :)
Much insight and understanding can be gained from Apple Worldwide Developers Conference (WWDC) videos.
Designing Great Apps highlights some videos and guides that may be helpful.
Designing Intuitive User Experiences. Learn about the key concepts and principles that will enable you to make your app more intuitive and approachable.
While one specific video may not cover all the practices you're looking to understand, the principles and recommendations that they present will set you on the right path, and bring you closer to your goal.
If you're not sure what videos to watch, try ASCIIwwdc to search session content.

Starting point for app creating, where to start

I am looking to start writing apps for mobile devices. I know a little about this subjec, and I am proficient in both java and python. However, before jumping into creating apps I wanted to get the community's input on a question I have not yet found the answer to:
How/Where should I begin?
I understand this question is fairly general/basic for a community that focuses on solving/debugging complex programs, but if there is a recommended tutorial (or specific platform) that will help a beginner(such as myself), it would greatly reduce the frustration and amount of monotonous questions asked on this forum and others.
Regards
Coursera is offering 3 courses all using android development which started last week. That would be an excellent starting point for anyone:
https://www.coursera.org/specialization/mobilecloudcomputing/2
How/Where should I begin?
I don't know about you, but I often learn by example more than reading. You mentioned that you're proficient in java so thats a great start. After you understand the Android SDK it's really only the UI good practices you need to learn. So here's my suggestion.
Start off with something super simple. Let's say, create your own version of a calculator. Something that can add, subtract, multiply, and divide. This should be dirty, ugly, but works correctly.
After doing this, take a look at some other android calculators on the play store. Check out Simple Loan Calculator. I use this example because it offers a lot of android UI components. ViewPager, ActionBar, etc. Download this app, take a look at it, and try to mimic it. This should provide an idea on how to work with the android UI components.
What's next? After you have done these two apps you should be relatively ready to tackle your own project.
HTML apps are easy to port across multiple mobile platforms. I have set up an Android HTML template as a starting point. You can just import this project into Eclipse and take a look at that.
https://github.com/jakewp11/HTML5_Android_Template
Here is my experience for ios,
There are three things that I consider as pillars
Objective C
Memory managment
Design patterns
The first one looks obvious but I'd stress on learning concepts like protocols, categories, extensions. As a beginner I thought that learning the syntax was enough, but time and again I had to jump back to the language concepts to understand what's going.
The memory managment , the most talked and confusing subject and now since we have automatic referenc counting to make things simpler and often new Dev skips learning memory concepts (I did it). So I suggest you to have an idea what actually happens under the hood of arc " the manual memory managment"
The design patters,
When I started off , to pass data and control , what I used to do was achieve every thing through the only design patten I knew (target action) . I lack the knowledge of design patters didn't how easily I could achive better results with less code.
Some resources:
Dev.apple.com
http://www.raywenderlich.com (one of my best tutorials are here, you can find one on design patterns)
http://rypress.com/tutorials/objective-c/
And yes , the sample projects at Dev.apple are the best tutors.

Examples of Android Widget Types

I'm porting an app from iOS to Android, I've read a couple of books and am kind of learning as I go along. One thing I'm having trouble with is finding a document, app or website that will show me the different types of widgets available and what they're called. Does anybody know of any resource that does this?
I'm asking specifically because I stumbled on this lovely thing in the Android docs and can't for the life of me find out what the widget is.
That particular widget is the NumberPicker. Most of the widgets are in the android.widget package. You can also look at the User Interface developer guide that has some good information.

open source user-security/password scheme

I've read numerous discussions lately about different forms of security for mobile devices outside of the typical password/pin code setup.
The articles talk about recognizing the touchscreen as a human input device and that security measures in apps ought to evolve for that as well.
One such concept involved a graphical keylock like one you would see on a safe. The would have to use multiple fingers to twist it to the correct combination. I haven't done any OpenGL stuff so I wouldn't really know how to develop that, has it been done, is it open source?
I did read this: Security Beyond a Username/Password? , but I am looking for other opinions.
Thanks for any suggestions and resources. Also please post resources instead of voting to close if it comes down to that.
I cann't say for all mobile devices, but iOS SDK provides UIGestureRecognizer class, you may create a subclass that UIGestureRecognizer that recognizes a distinctive gesture, character or some kind of gesture combination (in your case). I assume another mobile technologies also have similar methods to recognize keylock characters.
Hope it help you.

Where to find Android Development Homework Problems

Ok so I am starting off with android development and I have found a bunch of useful tutorials so I am set there. What I am looking for is a resource that provides homework style problems to do and has the answers downloadable so I can check my solution against the "official" solution.
So for example instead of the notepad tutorial it would be: "Build an application that you can create, edit, delete notes, ...etc.". Ideally the "official" solution would have some explanation as to why they built it the way they did. (so a tutorial at the tail end)
Anyone know of any resources that provide their tutorials in this format?
Thanks.
Okay, here's one: build me an app that allows the user to make, modify, and store notes. The 'official' answer is the Notepad app in the 9th level of the api. (Note that this is different from the notepad tutorial).
The point is that asking questions is easy, the harder part is actually making a program that does the job. And #Roflecoptr is right, at this level it can be implemented very differently. But if you want that mindset, you can write your own 'homework' easily. Just think up a few things you want that are simple, build it, does it do what you want well? Then you pass.
Despite for very trivial problems I dont think this is possible, because there are way to much possible implementation possibilites so that you can't compare your solution to the "official" solution.
But why do you need something like that? If you want to learn to program on Android, you can just follow some tutorials you've already found and then modify them, adapt them to your needs. When you get more used to the development of Android apps you can just get some ideas on tutorials/android development sites and then implement your own solution. There is plenty of help available here on SO and on other development sites, which will help you if you really get stuck.
You could always go to the Android Samples page, and without looking at their implementations, do your own and compare. The samples page is here:
http://developer.android.com/resources/samples/index.html

Categories

Resources