android.permission.GET_ACCOUNTS

by strazzere » Fri, 10 Apr 2009 10:28:54 GMT


Sponsored Links
 Are there any examples of how to use android.permission.GET_ACCOUNTS ?
Or is this an unimplimented api? I found this site;
 http://joakim.erdfelt.com/wiki/index.php/AndroidGetAccount 

Though I haven't been able to get anything to work. I believe JBQ said
it was a private api - but I'm not sure why the permission is listed
on the dev reference?
--~--~---------~--~----~------------~-------~--~----~



android.permission.GET_ACCOUNTS

by Dianne Hackborn » Fri, 10 Apr 2009 10:45:24 GMT


 We unfortunately left most of the permission string constants in the SDK,
even for ones protecting private APIs.  So something being there doesn't
mean there is an API for it.






-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

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


Sponsored Links


Other Threads

1. Android web application submission.

Hi Friends,

I have developed an application which contains an icon in the
emulator, by clicking the icon it will redirect to the application
webpage.
There we can perform the manipulations and submitting the requests
etc.

Is this kind of application is eligible to submit to the Android
Market or not?
Please let me know ASAP.


Any help regarding this will be helpful to me.


Thanks & Regards
Adamthulla.K
adamthu...@infobraintech.com

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

2. To Arvind

Hi Arvind this is an example for u...

ItemizedOverlay Example:
---------------------------------------




package samp.sam11;

//import mapv.mapapi.R;

import java.io.IOException;
import java.util.List;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

//import de.michaelhuebl.android.R;
//import de.michaelhuebl.android.simpleGoogleMaps;
import android.view.View;
import android.view.View.OnClickListener;

import android.app.AlertDialog;
import android.app.Dialog;
import android.graphics.drawable.Drawable;
import android.location.Address;
import android.location.Geocoder;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;

public class sam1 extends MapActivity {


        protected boolean isRouteDisplayed() {
                // TODO Auto-generated method stub
                return false;
        }
    /** Called when the activity is first created. */


    MapView mapView;
    EditText edt;
    Button bttn;
    Geocoder gc;
    double lat;
    double lon;
    List<Overlay> mapOverlays;
    Drawable drawable;
    HelloItemizedOverlay itemizedOverlay;



    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mapView = (MapView) findViewById(R.id.mapview);
        edt=(EditText)findViewById(R.id.edt);
        bttn=(Button)findViewById(R.id.bttn);


        gc=new Geocoder(this);
        bttn.setOnClickListener(new OnClickListener(){


                public void onClick(View v)
                {
                        String str=edt.getText().toString();



                        try {
                                        List<Address> 
loc=gc.getFromLocationName(str,7);

                                        if(loc.size()!=0)
                                        {
                                        for(int i=0;i<loc.size();++i){

                                        Address x=loc.get(i);
                                        lat=x.getLatitude();
                                        lon=x.getLongitude();
                                        }
                                        
gotolocation((lat*1000000),(lon*1000000),mapView);
                                        }
                                        else
                                {
                                        Dialog locationError = new 
AlertDialog.Builder(
                                                                
sam1.this).setIcon(0).setTitle(
                                                                
"Error").setPositiveButton(R.string.ok, null)
                                                                .setMessage(
                                                                                
"Sorry, your address doesn't exist.")
                                                                .create();
                                                locationError.show();
                                }

                                } catch (IOException e) {
                                        // TODO Auto-generated catch block
                                        e.printStackTrace();
                                }



                }

        });


    }

    public void gotolocation(double latitude,double longitude,MapView
mymap)
    {
        GeoPoint p=new GeoPoint((int) latitude,(int) longitude);
        mapOverlays = mapView.getOverlays();
        drawable = this.getResources().getDrawable
(R.drawable.androidmarker);
        itemizedOverlay = new HelloItemizedOverlay(drawable);
        mapView.displayZoomControls(true);
        OverlayItem overlayitem = new OverlayItem(p, "", "");
        itemizedOverlay.addOverlay(overlayitem);
        mapOverlays.add(itemizedOverlay);

        MapController mc=mapView.getController();
        mc.animateTo(p);
        int zoomlevel=mapView.getMaxZoomLevel();
        mc.setZoom(zoomlevel - 1);
        mapView.setSatellite(false);


    }




}




HelloItemizedOverlay Class file:
-------------------------------------------------




package samp.sam11;

import java.util.ArrayList;

import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class HelloItemizedOverlay extends ItemizedOverlay {

        private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>
();


        public HelloItemizedOverlay(Drawable defaultMarker) {
                super(boundCenterBottom(defaultMarker));



                // TODO Auto-generated constructor stub
        }
        public void addOverlay(OverlayItem overlay) {
            mOverlays.add(overlay);
            populate();
        }

        @Override
        protected OverlayItem createItem(int i) {
                // TODO Auto-generated method stub
                return mOverlays.get(i);

        }

        @Override
        public int size() {
                // TODO Auto-generated method stub
                return mOverlays.size();
        }

}




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

3. Getting the Share menu to work correctly / Registering Intents correctly

4. Changing a color in a Drawable

5. failed to locate packages - Eclipse IDE

6. Communication between Android devices over 3G

7. i wish to join this group to get help for android x86 porting