What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by Indicator Veritatis » Thu, 29 Jul 2010 04:48:15 GMT


Sponsored Links
 My guess is that it is the non-Samsung phones that are doing something
non-standard, something you cannot rely on. For as I read your code,
you are trying to view not just a contact, but an entire contact
database. I don't think Android guarantees that that Action is
supported on the entire database.

Try appending a specific ID to the Uri.




--



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by Dmitri Plotnikov » Thu, 29 Jul 2010 05:05:59 GMT


 The code appears to be correct - it is supposed to work on any Android phone
:-(

However, calling it for result does not really make sense.  It is supposed
to launch the activity and that's that - no result will be returned.

If you need to user to pick a contact from the list, do this instead:

new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI)

Cheers,
- Dmitri






>


Sponsored Links


What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by pistol » Sat, 31 Jul 2010 20:32:43 GMT


 You are right - I needn't startActivityForResult() - just
startActivity().
I still would get the ActivityNotFiundException though.
;-(

I just want the Contacts 'view' opened up so the user can look at
them.  Not to pick or return (a specific) one.

I works fine on all my phones and emulators.

Pete





> >



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by pistol » Mon, 02 Aug 2010 16:03:03 GMT


 Currently I think the only fix is to not offer the option to Samsung
phones - a very bad solution.






> > >



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by Dmitri Plotnikov » Tue, 03 Aug 2010 00:54:08 GMT


 I doubt that it will work, but have you tried the alternative URL:

new Intent(ContactsContract.Intents.UI.LIST_ALL_CONTACTS_ACTION,
Contacts.CONTENT_URI)

Cheers,
- Dmitri








> > > >



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by pistol » Tue, 03 Aug 2010 19:48:53 GMT


 i Dmitri,

I am open to anything but
ContactsContract.Intents.UI.LIST_ALL_CONTACTS_ACTION
does not seem to exist?
There was a similar Action available on the deprecated Contacts class
but I am trying to avoid that.

Thanks,
Pete

On 2 Aug, 17:53, Dmitri Plotnikov <dplotni...@google.com> wrote:
> > > > >



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by pistol » Tue, 03 Aug 2010 19:49:00 GMT


 i Dmitri,

I am open to anything but
ContactsContract.Intents.UI.LIST_ALL_CONTACTS_ACTION
does not seem to exist?
There was a similar Action available on the deprecated Contacts class
but I am trying to avoid that.

Thanks,
Pete

On 2 Aug, 17:53, Dmitri Plotnikov <dplotni...@google.com> wrote:
> > > > >



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by pistol » Wed, 04 Aug 2010 16:28:24 GMT


 Unless of course this is not officially supported by Android - in
which case I shouldn't do it at all.







> > > >



What is the URI for the Contacts content provider on Samsung phones? ActivityNotFoundException:

by Dmitri Plotnikov » Thu, 05 Aug 2010 00:22:38 GMT


 ou are right - I forgot that this intent is hidden API.

Ironically, the deprecated equivalent Contacts.UI.LIST_ALL_CONTACTS_ACTION
is public and therefore is supposed to work. ;)

On Wed, Aug 4, 2010 at 1:28 AM, pistol <lava.d...@gmail.com> wrote:

> > > > >



Other Threads

1. Problem with getting GPS data when using Camera

Hi,

      I have a similar problem as this link mention (Problem with
getting GPS data when using CameraPreview:):

http://stackoverflow.com/questions/3950026/problem-with-getting-gps-data-when-using-camerapreview

The problem is: the GPS will stop receiving data if you turn on the
camera  !!!!!!!!!!!!!!!!!


I wrote a simple code to test the conflict as follows:

package com.example.helloandroid;
import android.app.Activity;
import android.content.Context;
import android.hardware.Camera;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.Toast;
public class HelloAndroid extends Activity
{
        LocationManager mlocManager;
        LocationListener mlocListener;
        Camera camera;

/** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState)
        {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);

                /* Use the LocationManager class to obtain GPS
locations */
                mlocManager =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);
                mlocListener = new MyLocationListener();
 
mlocManager.requestLocationUpdates( LocationManager.GPS_PROVIDER, 0,
0, mlocListener);

                camera = Camera.open();// This is just for test, if
you comment this line, the GPS will work!!!!
        }

        @Override
        protected void onDestroy()
        {
                mlocManager.removeUpdates(mlocListener);
                super.onDestroy();
        }

        /* Class My Location Listener */
        public class MyLocationListener implements LocationListener
        {
                public void onLocationChanged(Location loc)
                {
                        String Text = "My current location is:\n" +
"Latitud = " + loc.getLatitude() + "\nLongitud = " + loc.getLongitude()
+ "\nAccuracy = "+ loc.getAccuracy();
 
Toast.makeText(getApplicationContext(),Text,Toast.LENGTH_SHORT).show();
                        Log.d("GPS", "getSpeed = " + loc.getSpeed()+"
Latitud = " + loc.getLatitude()+" Longitud = " + loc.getLongitude());
                }

                public void onProviderDisabled(String provider)
                {
                        Toast.makeText(getApplicationContext(),"Gps
Disabled",Toast.LENGTH_SHORT ).show();
                }

                public void onProviderEnabled(String provider)
                {
                        Toast.makeText(getApplicationContext(),"Gps
Enabled",Toast.LENGTH_SHORT).show();
                }

                public void onStatusChanged(String provider, int
status, Bundle extras){}
         }
}



     Anyone have solution?  I appreciate your help.

-- 

2. Help with invoking Android Medfield Gingerbread to stop/exit Media Player with am command

Hi,
Is there a way to invoke Android Medfield Gingerbread to stop/exit
Media Player with "am" command. I figured out how to start playing an
audio file with this command

adb shell am start -a com.android.music.PAYEBACK_VIEWER -d
file:///mnt/sdcard/Mozart48k.wav -n
com.android.music/.MediaPlaybackActivity

However when I play another audio file I get an warning message,
"Warning: Activity not started, its current task has been brought to
the front". This mean I have to stop or exit Media Player before I can
run the command line above once again.

Regards,
Siver Salih

-- 

3. Any Android Intent is broadcasted by System while launching any app(like Contacts, Gallery,..) from Home screen?

4. Apply tween animation to a drawable

5. control Media Player from command line?

6. Local Storage for webview

7. I keep on getting 401 when sending msg to C2DM server