Android :: GPS Lookup And User Preference
Aug 6, 2010
I'm starting to dip my toes into LocationManager. I've created a service which tracks GPS location (interval is more than 60000ms) and updates my application with user location so they can find stuff nearby. As I understand it, users can go into their preferences and disable GPS for a particular application. I would essentially like to offer my users two modes.
1) GPS. 2) If GPS can not pull, device does not have a GPS chip, or GPS is turned off for my app, I would like to allow them to type in their zip code (or maybe switch to cell tower lookup).
The bold text is what I'm interested in. How can I tell if the device does not have GPS? How can I tell if the user has disabled GPS for my application?
Side question: My service gets launched from my 2nd Activity. I call stopService in the onDestroy method of this Activity. If I back up to my 1st Activity and the 2nd Activity is destroyed, I still notice the GPS icon on my phone running. Is stopping the service sufficient? Or do I need to stop the LocationManager in the onDestroy of the service?
View 2 Replies
Jul 8, 2010
I have added a mute button to a menu on my application and am wondering if it is possible to store the user's latest preference of either muted or unmuted for use when he/she reopens the application. Here is the code I am using for setting mute or umute:
public void isMute() {
if(mIsMute){
mAm.setStreamMute(AudioManager.STREAM_MUSIC, false);
mIsMute = false;
}else{
mAm.setStreamMute(AudioManager.STREAM_MUSIC, true);
mIsMute = true;
}
}
View 2 Replies
View Related
Apr 15, 2010
I'm using Windows to develop android apps and want to know where user preference data is located. It says at /data/data/package/...., but where can I actually see the preference file? Via eclipse or command line tools?
View 1 Replies
View Related
Apr 18, 2010
I've got an app that I don't want to auto-rotate. Currently, I've got it setup so that it is always in portrait mode. However, I'd like to add a setting to my preferences where the user can choose either portrait or landscape mode. Is there a way to force screen rotation? Or, could I perhaps make two different layout XML files, one for portrait and one for landscape, and programmatically choose which to use?
View 9 Replies
View Related
Apr 29, 2009
Is there any API to use DNS lookup in Android? My application connect to a server and to final user, we don't want that user need to enter the IP, but a hostname. I found dnsjava, a lib to handle that, but if Android would have this, it becomes better.
View 2 Replies
View Related
Jan 20, 2010
I am using android 2.0.1. I have a group id and I am trying to find all contacts in this group. I have been banging my head against the wall on this for a while. I can't seem to find a contentprovider that ties these two together.There has to be a standard answer to this question?
View 3 Replies
View Related
Sep 20, 2010
I'm currently writing a application that allows to save drafts (using android version >= 2.0). Each draft is connected to a contact via the ContactsContract.Contacts.LOOKUP_KEY. My problem is that if I change the name of my contact the lookup key changes also. Is that the way this works?
So for what do I need a lookup key? I thought that the lookup key does never change and now it changes anyway. I'm confused about that behavior. Can someone explain to me how to link permanently to a contact? Should I use IDs instead of the lookup key?
View 1 Replies
View Related
Jul 6, 2009
What I'm trying to do, is to get the corresponding contact to a phone number. It works perfect if the number is stored in the contacts in the following format: +<country code><area code><number> But not all numbers are stored this way. Most are without the country code or with "00" instead of "+". Do I have to parse the number by myself and set up a corresponding WHERE clause for the query, or is there anything I can't find in the internet to get this one done by the framework?
View 4 Replies
View Related
Aug 26, 2009
Does android use a color look up table ? if yes I wanted to see the entries in color lookup table and access them.
View 3 Replies
View Related
Feb 12, 2010
How to lookup in contacts table for the contact of the incoming sms
View 4 Replies
View Related
May 29, 2010
I've been a WM user for years, and I am tempted to change for an Android (HTC desire...), BUT... I can't find if Android will fulfil my specific needs.
I use my smartphone mainly as an ebook reader, and I read English literature, although my moher tongue is French, so I need to lookup words in the dictionary quite frequently. Since I read i places where I don't have an Internet access, I need the dictionary to be offline.
All this works perfectly well with Windows Reader on WM, and a free EN / FR issued with the reader: you tap on an unknown word, it opens the menu and you just click on "Definition..." to obtain the it (no need to re-type the word, and the lookup analyses the "morphology of the word, so that whatever the grammatical form it can be recognised)
So, my question is: is it possible to have the same features on Android in general, and the HTC desire in particular? That is:
- an ebook reader app that won't bother me with DRMs and let me read my DRM-free "home made" ebook files
- that comprises or can be used in connection with an OFFLINE EN / FR dictionary (or a simple English dictionary, it would do perfectly well, as long as it defines the word)
- and where you don't need to re-type the word you want to look up, just tap on it then launch the dictionary in 1 click
- the dictionary should be able to do some morphological analysis, i.e. if you ask for the definition of, say, "seen", it should recognise it as a form of "to see".
I have done some research, and found that there's an ebook app on Android that seems quite successful, Aldiko, and it claims that it has a dictionary lookup function, BUT from what I have seen on the web, it seems that you have although you can call the dictionary easily from the app,you have to re-type the word, so it doesn't fit my bill (besides, it's not clear whether the dictionary is offline or not).
View 2 Replies
View Related
Nov 14, 2010
I'm using a Android Wildfire and I used the following code to lookup the contact name of an existing phone number.
private String getContactNameFromNumber(String number) { String[] projection = new String[] { Contacts.Phones.DISPLAY_NAME, Contacts.Phones.NUMBER };
Uri contactUri = Uri.withAppendedPath(Contacts.Phones.CONTENT_FILTER_URL, Uri.encode(number));
Log.d(TAG, contactUri.toString());
// query time
Cursor c = context.getContentResolver().query(contactUri, projection, null, null, null);
// if the query returns 1 or more results
// return the first result
if (c.moveToFirst()) {
String name = c.getString(c.getColumnIndex(Contacts.Phones.DISPLAY_NAME));
Log.d(TAG, name);
return name;
}
// return null if no match was found return null;
}
I am unable to resolve the contact name. The logcat output shows the following
11-14 13:45:35.879: DEBUG/Test(3342): content://contacts/phones/filter/%2B919773653345
View 2 Replies
View Related
Jun 4, 2010
After you select a word, you have the option to copy it, look it up or share it. I find the built in quick lookup app pretty awesome since it has wikipedia, translate and dictionary all combined into one. However, I can't figure out how to open the application directly to lookup other words. And typing in words in the quick search box doesn't look it up either. I'm on Droid Incredible.
View 3 Replies
View Related
Feb 21, 2010
Is someArray[index] a faster way to get to a value than someObject.field?
E.g.: if(intArray[i] == 42) {//do stuff}
VS
if(someObject.x == 42) {//do stuff}
I will try to test it soon and post the results; just wondering if you all had any thoughts.
View 1 Replies
View Related
Oct 14, 2009
This happens only when my G1 phone is on T-Mobile network: I found that when I try to go to the browser, and type the address:
http://i0.sinaimg.cn/
The browser tries to load the page, but no progress is shown for more than 2 minutes. (I have full 3G signal; all other addresses work just fine). Eventually when I tried to access this URL in my Java code, I found a similar long delay when I try to open the HttpUrlConnection, and eventually I get this exception:
I/InetAddress( 1940): Unknown host i0.sinaimg.cn, throwing UnknownHostException W/System.err( 1940): java.net.UnknownHostException: Host is unresolved: i0.sinaimg.cn:80 W/System.err( 1940): at java.net.Socket.connect(Socket.java:1002)
Why would DNS take so long? Also, if my program tries to issue the same HTTP request again, the same 2+ minute blocking happened. Is this an Android bug or a T-Mobile infrastructure bug? It seems the Android API should try to time-out faster, especially on the second attempt.
View 11 Replies
View Related
Apr 2, 2010
I am developing on a Mac with Eclipse and have the skeleton for an app that implements the standard framework callbacks (onCreate, onDestroy, onPause, etc.). When I set breakpoints in the callbacks the debugger stops and displays a tab that says
"ActivityThread.performLaunchActivity(ActivityThread $ActivityRecord,Intent)line:2477" and in the tab page body there is some red text that says "Source not found" and a button that says
"Edit Source Lookup Path...". I have tried adding several paths via "Edit Source Lookup Path..." but can't see to find the one Eclipse is looking for.
View 1 Replies
View Related
Jul 26, 2010
I am starting PA school soon and am going to want to have some handy medical apps on my phone. Do you know of a good website to browse apps? Any good medical apps you know of offhand?
View 4 Replies
View Related
Sep 30, 2010
Nnow that I've ventured away from the sense UI and rooted/CM6'd my Hero, I'm finding it hard to find contacts easily. In sense, you could start searching for contacts from the phone's dialpad using the T9 system - but that system doesn't exist here. Yes, I have some starred contacts - and the phone log "helps". But I can't star everyone (defeats the purpose) and going back through the phone log can be more trouble than just going into contacts and searching.
View 9 Replies
View Related
Mar 23, 2014
I have an unrooted S4 on ATT. I bought it 4.2.2, but I was given the 4.4.2 upgrade a few weeks ago. It's my understanding that KitKat devices will have a reverse phone lookup automatically built into the phone, displaying the name of any business that has that number listed on Google Places/Local.
It doesn't seem to work on my phone. Is this feature for KitKat devices moving forward where 4.4 is native to the phone, or are any devices on that version able to use that feature?
I can't seem to enable or or get it to work...I did some shopping yesterday and had customer services at a few stores call my phone just to see if it worked, but alas it did not. I need to do a factory reset because "old data and new data do not mix" but I have serious trepidations about doing the factory reset because I am skeptical it would change anything. The update changed enough on my phone, I find it hard to believe that some features would work, and others wouldn't.
Someone else in the aforementioned thread said they have the Google edition and enabled "Caller ID by Google". However, Under Call Settings>Additional Settings>CallerID> there are 3 options, each with a radio button: Network Default, Hide Number, Show Number. Currently Network Default is enabled, but no mention of Google.
View 4 Replies
View Related
Sep 22, 2010
I have a EditText in android in which i want the user to enter the text and checks for the condition "BYE"
Code sample..
How can i make user to enter the text?The UI should wait for the text to be entered(something like we have InputStreamReader in java applications).
View 2 Replies
View Related
Aug 24, 2010
Is there a way on the Droid X (or any Android) to lookup a contact by their phone number? On the iPhone you can type the number in via the number pad and if it's in your contacts, the name is displayed.
View 3 Replies
View Related
May 10, 2010
I just switched my contacts from Outlook to Gmail. No problem in doing that. I left the outlook contacts on the phone (just in case), but switched the View item in people to only show the gmail contacts. Whenever I make or receive a call now, the caller ID lookup always tells me I'm calling or receiving a call from one particular user, who is not the caller/callee. Clearly I need to clear a lookup cache, but which one? There are the following caches/data that might need to be cleared: Contacts Storage, Gmail Storage, People.
View 5 Replies
View Related
Nov 18, 2009
I have a Droid and download many random apps. Many of them run and I kill them often to not have a laggy performance but it still happens quite a bit. I get many random force closes from all kinds of apps.
Problem:
Steps to Create force close everytime in Messaging:
1. Compose new message
2. Type in "D"
3. Type in "A"
4. *Messaging (process com.android.mms) has stopped (no wait button to choose)
Once A is typed it always force closes (40 times in a row).
View 6 Replies
View Related
Apr 19, 2010
Anyone here using HTC Desire's Mail app to connect to Exchange 2003 server?
Everything's working great except I can't get GAL Lookup (Global Address List) to work. Mail's downloading just fine, Calendar sync's great and Contact sync's good.. but that critical moment when you want to shoot off an urgent note to an office colleague & can't remember his email handle... bummer! Stuck!
Strangely, in NexusOne when I had to rely on Touchdown by Nitrodesk, the Address Lookup worked just fine...
HTC bug perhaps? Of all the issues, I think this is Desire's biggest.
View 2 Replies
View Related
May 28, 2010
I'm pretty sure it's not viable to do what I'd like to based on some initial research, but I figured it couldn't hurt to ask the community of experts here in case someone knows a way.
I'd like to create a custom field for contacts that the user is able to edit from the main Contacts app; however, the user should only be allowed to select from a list of four specific values. A short list of string values would be ideal, but an int with a min/max range would suffice.
I'm interested in knowing if it's possible either way, but also wondering if it make sense to go this route performance wise. More specifically, would it be better to look up a contact (based on a phone number) each time a call or SMS message is received or better to store my own set of data (consisting of name, numbers, and the custom field) and just syncing contact info in a thread every so often? Or syncing contacts the first time the app is run and then registering for changes using ContentObserver?
View 1 Replies
View Related
Feb 15, 2010
I have next situation: After installing application it has to init settings from server. And while it is not has right preferences it has to wait. I have several receivers and service - I don't want to check for initialization in every action in these components - I think there have to be better solution.
View 3 Replies
View Related
Sep 23, 2010
I have the following code in my application in res/xml/preferences.xml:
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="Wi-Fi settings">
<EditTextPreference
android:key="pref_voice_threshold_top"
android:title="@string/title_pref_voicetopthreshold"
android:dialogTitle="@string/dialog_title_pref_voicetopthreshold"
android:defaultValue="20" android:inputType="number"/>
</PreferenceCategory> </PreferenceScreen>
And I was wondering is it possible for me to then use this preference in code so I can update it via downloading an xml file? So I currently display the above preference in a PreferenceActivity, which works fine, however I want to be able to update the setting by downloading a new setting every week from the internet. So my question is how do I open this preference in code and set its value to the new downloaded value?
View 2 Replies
View Related
Feb 16, 2009
I have an Android application in which I have my preferences in a xml file, which works fine. I've now want to set one of the preferences using code instead of displaying the entire preference screen, how would I go about doing this?
View 1 Replies
View Related
Sep 24, 2009
I have pretty unassuming preferences screen based on Preference Activity. (You can see it in DroidIn app) I'm having some problems with it that I think have to do with redrawing the screen after updates. Here are the symptoms: 1. OnPreferenceChangeListener#onPreferenceChange if I change summary of the preference by doing Preference#setSummary the new value is painted over the old one creating unsightly effect 2. My preferences screen is large enough that user has to scroll. While scrolling, the whole screen get all messed up, again it looks like view is redrawn (when scrolled) without erasing the background first.
View 2 Replies
View Related
Aug 12, 2010
PreferenceManager contains very useful methods like "registerOnActivityResultListener" which enables you to call startActivityForResult in your custom preference like RingtonePreference does but it's restricted at the package level.So tell me, let's say I wanted a ImagePreference. How should I proceed? I want to be able to use a activity for result intent with the PICK action.
View 7 Replies
View Related