Maps: service not available

by coy » Wed, 04 Aug 2010 00:24:56 GMT


Sponsored Links
 See the code:

@Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        mapView = (MapView) findViewById(R.id.mapView);
        LinearLayout zoomLayout =
(LinearLayout)findViewById(R.id.zoom);
        View zoomView = mapView.getZoomControls();

        zoomLayout.addView(zoomView,
            new LinearLayout.LayoutParams(
                LayoutParams.WRAP_CONTENT,
                LayoutParams.WRAP_CONTENT));
        mapView.displayZoomControls(true);

        mc = mapView.getController();

        Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
        List<Address> addresses;
                try {
                        addresses = geoCoder.getFromLocationName(
                                "San Francisco, California", 1);
                        if (addresses.size() > 0) {
                                        p = new GeoPoint(
                                        (int) (addresses.get(0).getLatitude() * 
1E6),
                                        (int) (addresses.get(0).getLongitude() 
* 1E6));
                                mc.animateTo(p);
                                mc.setZoom(17);
                        }
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        AlertDialog.Builder alerta=new 
AlertDialog.Builder(this);
                alerta.setTitle("Error");
                alerta.setMessage(e.toString());
                alerta.setPositiveButton("Ok", null);
                alerta.show();
                }
    }

the dialogue displays me: service not available! and yesterday, it was
working perfectly.
this has happened to someone? any ideas?

Regards,
COY.

--



Maps: service not available

by coy » Wed, 04 Aug 2010 02:42:16 GMT


 Well, I haven't found a solution to this problem!
But my application is working in the sdk level 7. At level 8 it is
working!
why? o__O




--


Sponsored Links


Other Threads

1. ADOBE Flex Developers

Hi All,
We are looking for an experienced ADOBE FLEX developer. Please let me
know if you have anyone in mind....or you know of anyone looking for a
job with this skillset...

Thanks...


-- 

2. problems with the old and new Contact API

here's a few things i couldn't figure out and could find anyone else
posting them in the discussion:
1.
In the new API
ContactsContract.AggregationExceptions table does not really work for
me: when I try to insert a row into the table, it gives me this error:

07-13 14:20:09.399: ERROR/XXXXX(3074):
java.lang.UnsupportedOperationException: URI:
content://com.android.contacts/aggregation_exceptions, calling
user: ............
my code here:

ContentValues values = new ContentValues();
values.put(AggregationExceptions.RAW_CONTACT_ID1,
String.valueOf(oldRawContactId));
values.put(AggregationExceptions.RAW_CONTACT_ID2,
String.valueOf(newRawContactId));
values.put(AggregationExceptions.TYPE,
AggregationExceptions.TYPE_KEEP_TOGETHER);
mContentResolver.insert(AggregationExceptions.CONTENT_URI, values);

and I'm sure the two raw contact id exists.

2.
in the old API:
when I create a group in Contact book, the name of the group is not
shown(or not shown correctly)
here's the code:

ContentValues values = new ContentValues();
values.put(Contacts.Groups.SHOULD_SYNC, 1);
values.put(Contacts.Groups.SYSTEM_ID, mGroupID);
values.put(Contacts.Groups.NAME, mGroupTitle);
mContentResolver.insert(Contacts.Groups.CONTENT_URI, values);

3.
in the old API:
when I insert a custom IM contact method for a contact, the data is
inserted and shown correctly, but user cannot edit the contact using
the default contact app any more. If I remove the contact method, user
can edit the contact again.
here's the code for inserting the contact method:

ContentValues values = new ContentValues();
values.put(ContactMethods.PERSON_ID, newContactId);
values.put(ContactMethods.KIND, Contacts.KIND_IM);
values.put(ContactMethods.TYPE, ContactMethods.TYPE_CUSTOM);
values.put(ContactMethods.AUX_DATA,
ContactMethods.encodeCustomImProtocol(MYIM_PROTOCOL));
values.put(ContactMethods.DATA, buddyId);
values.put(ContactMethods.ISPRIMARY, 0);
values.put(ContactMethods.LABEL, IM_LABEL);

mContentResolver.insert(ContactMethods.CONTENT_URI, values);

-- 

3. xcode equivalent for android development

4. Button pressed color

5. Kang lucky in action @htc wildfire launching

6. SamsungFirmwares.com: No Official Froyo Updates For Spica

7. How can I find unneeded permission?