Switching from GPS to Network Positioning

by Harold » Tue, 15 Dec 2009 23:49:40 GMT


Sponsored Links
 Hello,
im using a PositioningService in my Application.
In the onCreate() Method im getting a LocationManager with the
Criteria.ACCURACY_FINE,
the Problem is, now im getting only a position if im outside through
gps. If im inside i get no Position.
If i dont set the Criteria, then i only get Signal from network, but
not from gps.
I want to get the Signal from the best LocationService and it should
swith automatically.
Do i have to register two Listeners? Or should i do something in the
"onProviderDisbaled/Enabled" , "onStatusChanged" Methods?

Thank you!

--



Other Threads

1. displaying contacts in a list

Hi,
I've been trying to display contacts in a list. Here's what I did:




activity.setContentView(R.layout.contacts);
                String[] projection = new String[] {
                            android.provider.BaseColumns._ID,
                            android.provider.Contacts.PeopleColumns.NAME,
                            //android.provider.Contacts.PhonesColumns.NUMBER,
                            //android.provider.Contacts.PeopleColumns.PHOTO
                        };

                int [] tempInt= new int[]{R.id.contactsList};


                        // Best way to retrieve a query; returns a managed 
query.
                        Cursor managedCursor =
activity.managedQuery(android.provider.Contacts.Phones.CONTENT_URI,
                                                projection,
                                                null,
        
android.provider.Contacts.PeopleColumns.NAME + " ASC"); // Order-by
clause.




        ListView contactsList=
(ListView)activity.findViewById(R.id.contactsList);
        SimpleCursorAdapter contactsAdapter= new
SimpleCursorAdapter(activity, android.R.layout.simple_list_item_1,
managedCursor, projection, tempInt );
        contactsList.setAdapter(contactsAdapter);


the above code does not give me and exception etc. but it doesn't
work. I see a blank list with no data in it. What could be the problem
and how can it be rectified?

Thanks,
Sylvester
--~--~---------~--~----~------------~-------~--~----~

2. Adding button to list 'Go to', 'Bookmarks', 'Windows', etc. with WebView

Hi all,

Here is my question: How can I easily modify this code to add 'my
button' at android web browser menu?

        super.onCreate(icicle);
        WebView w = new WebView(this);
        url = "www.test.com";
        w.loadUrl(url);
        setContentView(w);

Thanks,
Ruben

--~--~---------~--~----~------------~-------~--~----~

3. Retrieve Email Id from contacts

4. Lost sheep finder in the white spaces, please.

5. Android tracing and profiling

6. Read and modify and write back contacts

7. Android javadoc downloadable