Code example for Intent

Methods: getDatagetType

0
        assertEquals("foo", intent.getAction());
    } 
 
    @Test 
    public void testSetData() throws Exception { 
        Intent intent = new Intent();
        Uri uri = Uri.parse("content://this/and/that");
        intent.setType("abc");
        assertSame(intent, intent.setData(uri));
        assertSame(uri, intent.getData());
        assertNull(intent.getType());
    } 
 
    @Test 
    public void testSetType() throws Exception { 
        Intent intent = new Intent();
        intent.setData(Uri.parse("content://this/and/that"));
        assertSame(intent, intent.setType("def"));
        assertNull(intent.getData());
        assertEquals("def", intent.getType());
    }