Click here to Skip to main content
11,804,008 members (72,662 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Java Mobile Android
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
Edited 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 at 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 at 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 at 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 at 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
0 OriginalGriff 3,140
1 Maciej Los 1,910
2 KrunalRohit 1,907
3 CPallini 1,845
4 Richard MacCutchan 1,187

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 16 Mar 2013
Copyright © CodeProject, 1999-2015
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