AbstractWindowedCursor getLong - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for AbstractWindowedCursor getLong method.

This code example shows how to use the following methods:getLong, getString
    public boolean onContextItemSelected(MenuItem item) {
    	AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
        SQLiteCursor  cursor = (SQLiteCursor) getListView().getItemAtPosition(info.position);
        final Long suraID = cursor.getLong(1);
        final Long verseID = cursor.getLong(2);
        String verseText = cursor.getString(3);
        switch(item.getItemId()) {
            case COPY_ID:
            	clipboard.setText("'"+verseText+"' Al-Quran ("+suraID+":"+verseID+") (Quran360 for Android)");
                Toast.makeText(getApplicationContext(), clipboard.getText().toString(), Toast.LENGTH_SHORT).show();
               return true; 
            case CHECKPOINT_ID:
            	myDBHelper.editReadPoint(suraID, verseID, verseText);
                return true;                                 
            case BOOKMARK_ID:
            	myDBHelper.addBookmark("("+suraID+":"+verseID+")", suraID, verseID, (verseID-1), verseText);
This code example shows how to use the following methods:getColumnIndexOrThrow, moveToFirst, getLong, close
    public long getLastSmsTS() { 
        SQLiteCursor cursor = (SQLiteCursor) liteDatabase.query(TABLE_SMS_RECEIVED, new String[] {TABLE_COL_TS}, null, null, null, null, null);
	        if(cursor!=null && cursor.moveToFirst())
	        	return cursor.getLong(cursor.getColumnIndexOrThrow(SpeedCopDbAdapter.TABLE_COL_TS));
	        	return 0; 
     * returns wifi bssid  list or just empty list. 
    public synchronized List<String> getLastWifiScanResult(){
        SQLiteCursor cursor = (SQLiteCursor) liteDatabase.query(TABLE_WIFI_SCAN, new String[] {WS_COL_BSSID}, null, null, null, null, null);
        List<String> rtnList = new ArrayList<String>(); 
getLong Method Overview
Returns the value of the requested column as a long.
See Code Examples for other Android AbstractWindowedCursor Methods: