Click here to Skip to main content
13,048,406 members (146,356 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello freinds,

I am building an android app, in which i am aiming to give user suggestions of my application

text whenever he uses editText to enter something in any application.

Is this possible? If my app runs as a service, or is there some other way.

Thanks for your help in advance!!
Posted 16-Mar-13 10:50am
Updated 16-Mar-13 10:55am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Sure. What you need is called AutoComplete text. This is text suggested to the user based on the first few letters typed, which takes into consideration possible suggestions you include, or previous text typed.

public class CountriesActivity extends Activity {
     protected void onCreate(Bundle icicle) {
         ArrayAdapter<string> adapter = new ArrayAdapter<string>(this,
                 android.R.layout.simple_dropdown_item_1line, COUNTRIES);
         AutoCompleteTextView textView = (AutoCompleteTextView)
     private static final String[] COUNTRIES = new String[] {
         "option1", "option2", "bla bla bla", "etc.", "chose me"
Michael Haephrati 16-Mar-13 17:02pm
If you liked my answer please "accept"it and vote for it :) Now as for your questions, if you want to merge user inputs for all users, you can do it (and it is a great idea!) but it will not take place automatically. You need to do it programatically. So your application doesn't necessary have to run online this time. Just write a routine that periodically update the server, and the server will update all users.
Monster Maker 16-Mar-13 17:08pm
Yep i do like your answer? :)))
Thanks for appraisal, if app went gr8,, ur name will be mentioned their too... :)!!

LL b back soon!
Michael Haephrati 16-Mar-13 17:10pm
Let's keep in touch. My email is : Send me a private email and we can continue from here.
Monster Maker 16-Mar-13 17:12pm
code project worked for me.. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 16 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100