Android GraphPlace - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android GraphPlace class.

This code example shows how to use the following methods:getLocation
        GraphPlace spaceNeedle = responses.get(1).getGraphObjectAs(GraphPlace.class);
        assertTrue(eiffelTower != null);
        assertTrue(spaceNeedle != null);
 
        assertEquals("Paris", eiffelTower.getLocation().getCity());
        assertEquals("Seattle", spaceNeedle.getLocation().getCity());
    } 
 
    @MediumTest 
    @LargeTest 
    public void testFacebookErrorResponsesCreateErrors() { 
        setBatchApplicationIdForTestApp(); 
 
        Request request1 = new Request(null, "somestringthatshouldneverbeavalidfobjectid");
        Request request2 = new Request(null, "someotherstringthatshouldneverbeavalidfobjectid");
        List<Response> responses = Request.executeBatchAndWait(request1, request2);
 
        assertEquals(2, responses.size());
        assertTrue(responses.get(0).getError() != null);
        assertTrue(responses.get(1).getError() != null);
5
CodeRank
This code example shows how to use the following methods:getCategory, getLocation, getName
        String results = "";
        PlacePickerApplication application = (PlacePickerApplication) getApplication();
 
        GraphPlace selection = application.getSelectedPlace();
        if (selection != null) {
            GraphLocation location = selection.getLocation();
 
            results = String.format("Name: %s\nCategory: %s\nLocation: (%f,%f)\nStreet: %s, %s, %s, %s, %s",
                    selection.getName(), selection.getCategory(),
                    location.getLatitude(), location.getLongitude(),
                    location.getStreet(), location.getCity(), location.getState(), location.getZip(),
                    location.getCountry());
        } else { 
            results = "<No place selected>";
        } 
 
        resultsTextView.setText(results);
    } 
 
    public void onLocationChanged(Location location) {
5
CodeRank

Related Android GraphPlace Questions & Answers:

See Code Examples for Android GraphPlace Methods: