Android :: Best Practice For Responsive User Interfaces
Jun 16, 2009
I am quite new to Android and Java. Before I was working with C++ where the events where dispatched with messages. Now I would like to create the same user experience for Android platform and I would appreciate any of your suggestions or comments on what is the best way to bind events to user controls.
Here is an example from C++:
ON_MESSAGE(WM_RECORD_START, &CMainFrame::OnRecordStart)//Method OnRecordStarts() executes on WM_RECORD_START_MESSAGE...................
View 2 Replies
Mar 23, 2009
What is the recommended way to build user interfaces on the device based on layouts provided by a server at runtime? I am aware of this: <snip source="http://developer.android.com/reference/android/view/ LayoutInflater.html"> For performance reasons, view inflation relies heavily on pre- processing of XML files that is done at build time. Therefore, it is not currently possible to use LayoutInflater with an XmlPullParser over a plain XML file at runtime; it only works with an XmlPullParser returned from a compiled resource (R.something file.) </snip>
I could imagine these possibilities: - Parse XML by myself and build the ui tree. (Seems inappropriate to me since there is already maintained code which is able to do this.)
- Transform XML on server to a simpler format which is cheaper to parse on the device. (Inappropriate as above.)
- Preprocess the XML layout on the server the same way the build does. Transmit it to the client, and then try to load it. But how? android.content.res.XMLBlock is hidden (@hide) and I don't know how to classify the stuff in package com.android.layoutlib.bridge.
View 8 Replies
View Related
Mar 4, 2010
I have some well-debugged XML-RPC interfaces on a site that work wonderfully from both PHP and from JAVA. Using Eclipse I am able to write Java apps using either the Redstone or Apache XML-RPC libraries quite simply. These test cases using the 2 libraries utilize JavaSE-1.6 (jre6) libraries as well as one of the 2 xml-rpc libs referenced above.
My problem is making this work on Android. I have added ADT to my Eclipse setup and easily executed the HelloWorld test using a virtual 1.6 or 2.1 Android device - no problems. Whenever I go into the Build Path in Eclipse and add the external jars for either the apache or redstone XML-RPC libs my console goes wacky with a ton of the following:
Ignoring InnerClasses attribute for an anonymous inner class that doesn't come with an associated EnclosingMethod attribute. (This class was probably produced by a broken compiler.)
If I push ahead and debug the code when it actually ships off the XML request I get an exception out of the XML library on permissions of some sort. Why does this only happen in an "Android" project. These libraries seem to have no problem running in Non-Android standard java configs. Once we proof the ability to talk to our server we can proceed down the road of actually porting our app to Android.
View 2 Replies
View Related
Feb 23, 2009
I trying to create an application similar to the notepad3 tutorial. The main difference is that I need to be able to create different "note formats". Is possible to obtain an xml file from the web and use it in the creation of an android interface? I have researched about the Metawidget library that is a very useful tool for android but I haven't been able to create interfaces dynamically.
View 3 Replies
View Related
Jan 8, 2010
I'm porting an iPhone app to Android and I'm having trouble designing an interface that looks and feels "Android." I've read all of the design documents in the Android Dev Guide and looked through all the Google-designed apps, but I feel like the layout of activities is largely undefined. Are there any resources that could help me transition my iPhone design to the Android platform? Here's a quick example of one of my issues. On the iPhone, every view that presents user generated content gives the user a "+" button in the upper right hand corner of the screen to add an item. It's consistent across the built in apps, and it's *mostly* standard among third-party apps.
I don't know what to do with the "+" button on Android. The guidelines say important actions should be present on the screen and not hidden within a menu, so let's say I put it on the screen. It shouldn't go at the bottom of a long list of items, because the user shouldn't have to scroll down every time they want to create a new item. That leaves me with a static button. But there are no standard toolbars, so I'm going to design my own iPhone-esque bar at the top of the screen with a "+" button? I know this probably sounds like a rant, and I'm sorry. I feel it would be worthwhile for someone to sit down and document how common iPhone UI practices should be transitioned to Android apps. I care a lot about UI design - I think it's one of the most important factors in app development -- and I'd hate to see every transitioning developer approach this differently. At any rate, does anyone know of existing resources that might help me out? What's the best designed app you've used for Android? A few examples of great "Android" interfaces would go a long way.
View 10 Replies
View Related
Jul 22, 2010
i have created an application XYZApp and put it in package/ apps directory of eclair source code and i have added one directory name XYZFrame in framework/base and XYZFrame dir have native code, jni and interfaces. These interface define in framework/base/XYZFrame/ Interfaces/ directory are imported and implemented in class of package/app/XYZApp. The XYZFrame is added in build/core/pathmap.mk and compiled. The compilation is done and apk for XYZApp is created. I installed the XYZApp.apk in to galaxy phone using adb. Now when i execute the XYZApp. apk on galaxy phone, i m getting an error (interfaces not found and fail to link). These interfaces are defined in framework/base/XYZFrame/Interfaces/. i think that framwork/base/XYZFrame/Interfaces are not available on phone Or problem is some thing else.
View 3 Replies
View Related
Apr 12, 2010
The network interfaces on Android interfaces are listed as directories in the file system in /sys/class/net/.
For most Android devices the network interface for gprs traffic is called rmnet0 and for Wi-Fi it's usually eth0 or tiwlan0. I suspect that the cell interface for the Motorola CLIQ XT is rmnet0, but I would like to have this confirmed + know the name of the Wi-Fi interface. Also it would be good to know the device id for this model. This is the value available as android.os.Build.DEVICE in the Java SDK. (E.g. T-Mobile G1 uses dream, Samsung Galaxy uses GT-I7500, and Motorolda Droid uses sholes.)
View 1 Replies
View Related
Nov 4, 2010
We're planning to export an application layer AIDL interface. What are some best practices with regards for managing version compatibility? Does Android provide any version-related mechanisms for AIDL interfaces?
View 1 Replies
View Related
Mar 27, 2012
I am developing a NFC application using eclipse indigo.I use android.nfc package and can import the following:
android.nfc.NdefMessage
android.nfc.NdefRecord
android.nfc.NfcAdapter
android.nfc.NfcEvent
But I can't seem to be able to import
android.nfc.NfcAdapter.CreateNdefMessageCallback
android.nfc.NfcAdapter.OnNdefPushCompleteCallback
I get the following error: The import ... cannot be resolved.I am rookie on android, but I don't see why these two interfaces can't be imported. I used an example from andorid developers site called beam.java and it imports those interfaces in the exact same manner.
View 1 Replies
View Related
Sep 13, 2013
I have a specific 3G Simcard (specific APN) that can access to my network. I would like to share my 3G connection through wifi (for example)
After some tests, I can see that there is no network bridging between my 3G interface and my wlan0 interface.
So if I understand correctly, I need a rooted phone to do that ? ("route add" command line etc...)
Of is there an easiest way to bridge the traffic between two interfaces on an Android OS ?
View 1 Replies
View Related
Dec 14, 2013
I have website which Responsive, I Only need mobile apps for my site,so user can download .apk and iphone app from store and browse through app,
I have tried AppsGeyser but problem is its showing powered by AppsGeyser and also 50% ads commission, I don't want to use ads there, I just simple need to open website inside apps,
AppsGeyser is doing great ,only issue with powred by link, Is there any way/easy tutorial to create new app for my website ?
My website: qatarcommunity com Its compatible with every Mobile and tablet already
View 1 Replies
View Related
Jan 23, 2009
I need to load Contacts.Phones.CONTENT_URI and Contacts.ContactMethods.CONTENT_EMAIL_URI into a ListActivity.
Since these are separate Content URIs, I have two separate cursors and can't construct a SimpleCursorAdapter for use in the ListActivity.
The problem is that I have more than a thousand records for CONTENT_EMAIL_URI, which were automatically loaded by GMail. The app becomes unresponsive and Android prompts to kill the app or wait.
Is there a way to make the ListActivity content load in the background, like, by writing a custom implementation of android.widget.Adapter?
Or is it more feasible to use a single cursor, by manually running the SQL query on the contacts tables?
View 5 Replies
View Related
Aug 10, 2010
Sorry if someone else has posted this, but I searched and didn't find anything. I've noticed that since I updated a few days ago, my back button has become pretty useless. I have to tap it several times before it will go back a screen. I know I'm hitting the button right... there is still haptic feedback, just nothing happens on the screen.
View 4 Replies
View Related
Oct 4, 2010
I have had nothing but trouble with texting since Froyo release. Its leggy all the time and non responsive at times! Is there any fix for this?
View 21 Replies
View Related
Sep 19, 2010
So my EVO screen is unresponsive only when I use the dialer (keys 7, 8, 9 in stock dialer and 4, 5, 6 when I tried dialer one). Last I recall this was not an issue when using Fresh 0.5.3 but first emerged when i switched to Fresh 1.01. I promptly returned to Fresh 0.5.3 and the problem was gone. Within the last several weeks, I switched to a 2.2 ROM (Fresh 3.2) and the problem wasn't there until recently when I began flashing different ROMs to try. Anyone run into this a similar non-responsive touch screen only in certain apps and areas? The area of the screen is fine in other apps, it seems to be limited to the dialer.
View 4 Replies
View Related
May 24, 2010
I have noticed this as of today. I have been trying to hit some buttons like Home and Back but the phone isn't responding... Anyone else getting this problem? Also I have noticed that When I turn my phone from off to on the Wi-Fi just auto starts. Anyone else having these issues? Any Fixes? I am using Steinheil Crystal Clear Screen Protector but have had it on abou a week and just yesterday the phone started being un responsive. any ideas?
View 1 Replies
View Related
Mar 17, 2010
I am having a problem out of no where my touch screen goes unresponsive during a text message and i nothing works for a few seconds i push buttons and nothing happens and then all of a sudden it types all the buttons ive pushed while it was unresponsive! anyone else having this problem? it happens every 5-10 mins Help anyone else having this problem?
View 8 Replies
View Related
Jul 20, 2010
Has anyone else notice the back/return button not being as responsive? I have a screen protector on at the moment but noticed some issues prior to it as well. Is there a way to adjust sensitivity for the bottom buttons?
View 18 Replies
View Related
Mar 21, 2010
I've had this phone for a week now and today it developed something new. When I plug in the battery charger, the touch screen becomes almost entirely non-responsive. When I attempt to slide the Lock Screen away it either won't move or I can get it to slightly move but it bounces right back or even sticks halfway. If I unplug the charger and wait about a minute it's back to working fine again. I've removed the battery a few times now to see if this helped but nothing seems to help. It didn't do this till today. Anyone else run into this problem and if so how did you remedy it?
View 6 Replies
View Related
Jun 12, 2010
I was wondering if anyone has this problem. When someone calls my incredible I try to swipe the screen down, but the screen is non responsive whether i swipe up or down. I tried to search the forums for this problems, but i couldn't find anything on here or on a google search. Is there an app that fixes this?
View 1 Replies
View Related
Apr 15, 2010
Hey Androidforums mates, When I use my fingertips (index finger) on the touch screen (not my fingernail but just below it), it's not as responsive as using the flat part of your finger. Does this happen to you? Every time I use my fingertip to scroll around, it would always accidental open an app or accidental open up a link. If i use my thumb by the flat surface, it's fine as well.
Example:
The fingertip I was talking about is labeled "A" which I am having problems scrolling around with (seems like not sensing that part of the finger sometimes). If i use the part labeled "B", it's fine and 'connects' with my finger. It's fine when I press harder using "A" but that's CZ it is sensing more of my finger.
View 2 Replies
View Related
Jan 15, 2014
My contacts weren't backed up to google+. I really need to access my phone through my laptop to copy my contacts atleast? In can access recovery mode and wipe it but I really want my contacts off of it and some text messages. How I can do this? My replacement nexus 4 through device protection plan just arrived and I need to send the broken one back.
View 1 Replies
View Related
Aug 2, 2010
I have a sizable install base already on some apps with Android 1.5 set as the minimum version. I want to update the apps to take advantage of some of the newer features offered in Android 2.0 and greater. What is the best way forward so I don't break things for my current 1.5 and 1.6 users?
If I simply update the application with a new min SDK version, will 1.5 and 1.6 users be prompted to uninstall? Or will they just not see the update? What about future development that I want to apply for everyone, say a bugfix. Will I have painted myself into a corner? Another solution would be to fork and create a new app for 2.0 users, but that is undesirable for several reasons.
View 3 Replies
View Related
Jun 23, 2010
I have had my Desire no for almost 2 months, and like most I have tried installing and uninstalling many apps, to see what I like.Due to doing a factory reset on my phone yesterday I have layered back all the apps I was using and have noticed that I have used considerably less memory than before, making me very suspicious of the uninstall method used within the market place.Does it leave behind pieces of the app, and if so what's the cleanest method of uninstalling apps.
View 7 Replies
View Related
Dec 4, 2009
I've been scouring the web looking for information on setting up a peer-to-peer connection between Android handsets and so far have drawn a blank. The only thing I can definitively seem to work out is that it was made a whole lot more difficult when XMPP was removed from 1.0. Apart from that, I find a couple of threads on an OpenIntents board about porting an XMPP implementation to Android that were last posted nearly 2 years ago. Has anybody solved this problem effectively? What's the best way of doing it (from a games point of view)?
View 7 Replies
View Related
Sep 17, 2009
I'm writing an application where real-time knowledge of the GPS state is critical to convey to the user. I request GPS updates at 1000 ms intervals -- when I haven't received another update 1500 ms past the most recent update, I want to display a yellow icon, and 5000 ms after the most recent update I want to display a red icon. Currently, I'm doing it like this: private CountDownTimer gpstimeout; public void onLocationChanged(Location location) { if (gpstimeout != null) gpstimeout.cancel(); gpstimeout = new CountDownTimer(5000, 1500) { public void onTick(long m) { setYellow(); } public void onFinish() { setRed(); } }; gpstimeout.start(); }
View 3 Replies
View Related
Mar 22, 2010
What is considered "best practice" when executing queries on a SQLite db within an Android app? Is it safe to run inserts, deletes and select queries from an AsyncTask's doInBackground ? Or should I use the UI Thread? I suppose that db queries can be "heavy" and should not use the UI thread as it can lock up the app - resulting in an ANR. If I have several AsyncTasks, should they share a connection or should they open a connection each?
View 3 Replies
View Related
Sep 29, 2010
I'm new to developing Android applications, and have only a little experience with Java in school. I was redirected to StackOverflow from the Google groups page when I was looking for the Android Beginners group. I have a question about what is best practice to pull content from a web source and parse it. Firstly, I would eventually like to have my application threaded (by use of Handler?), however, my issue now is that the class I have created (Server) to connect and fetch content often fails to retrieve the content, which causes my JSON parser class (JSONParser) to fail, and my View to display nothing. After navigating to the previous Activity, and attempting to call the connect(), fetch(), and parse() methods on the same remote URI, it will work. Why does this (sometimes retrieve the remote data) happen sometimes, but not always? What is the best practice, including the use of ProgressDialog and the internal Handler class, to make my application seemless to the user. Is this the best place to ask this question?
View 1 Replies
View Related
Sep 22, 2009
I am creating a database driven app for managing people. I am showing a list of people with each name in a TextView. When a TextView is clicked, I launch a new intent to show the detail for the person. My question: What's the best practices for passing the id of the person to the new intent? The TextView is displaying the name of the person, so how do I know the id of the person? Once I know the id, I know how to pass it to the new intent, but I don't know what the best way to associate the id of the person to the TextView. Is there a best practice for this?
View 2 Replies
View Related
Aug 16, 2010
In general, I'm very impressed with Android's default text to speech engine (i.e., com.svox.pico). As expected, it mispronounces some words (as do I) and it therefore occasionally needs some pronunciation guidance. So I'm wondering about best practices for phonetically spelling out those words that the pico TTS engine mispronounces. For example, the correct pronunciation of the bird Chachalaca is CHAH-chah-LAH-kah. Here is what the TTS engine produces: mTts.speak("Chachalaca", TextToSpeech.QUEUE_ADD, null); // output: chuh-KAL-uh-KUH mTts.speak("CHAH-chah-LAH-kah", TextToSpeech.QUEUE_ADD, null); // output: CHAH-chah-EL-AY-AYCH-dash-kuh mTts.speak("CHAHchahLAHkah", TextToSpeech.QUEUE_ADD, null); // output: CHA-chah-LAH-ka mTts.speak("CHAH chah LOCKah", TextToSpeech.QUEUE_ADD, null); // output: CHAH-chah-LAH-kah Here are my questions. Is there a standard phonetic spelling recognized by the Android TTS engine? If not, are there some general rules for making custom pronunciation spellings that will make the spellings more likely to be correct in future TTS engines/versions? It appears that the Android TTS engine ignores text case. What is the best way to specify emphasis?
View 2 Replies
View Related