This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String noteWhere = ContactsContract.Data.CONTACT_ID + " = ? AND " + ContactsContract.Data.MIMETYPE + " = ?"; | |
String[] noteWhereParams = new String[]{id, | |
ContactsContract.CommonDataKinds.Note.CONTENT_ITEM_TYPE}; | |
Cursor noteCur = cr.query(ContactsContract.Data.CONTENT_URI, null, noteWhere, noteWhereParams, null); | |
if (noteCur.moveToFirst()) { | |
String note = noteCur.getString(noteCur.getColumnIndex(ContactsContract.CommonDataKinds.Note.NOTE)); | |
} | |
noteCur.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String addrWhere = ContactsContract.Data.CONTACT_ID + " = ? AND " + ContactsContract.Data.MIMETYPE + " = ?"; | |
String[] addrWhereParams = new String[]{id, | |
ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE}; | |
Cursor addrCur = cr.query(ContactsContract.Data.CONTENT_URI, | |
null, where, whereParameters, null); | |
while(addrCur.moveToNext()) { | |
String poBox = addrCur.getString( | |
addrCur.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.POBOX)); | |
String street = addrCur.getString( | |
addrCur.getColumnIndex(ContactsContract.CommonDataKinds.StructuredPostal.STREET)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uri smsUri = Uri.parse("tel:1234567"); | |
Intent intent = new Intent(Intent.ACTION_VIEW, smsUri); | |
intent.putExtra("sms_body", "Hello frend, How are you?"); | |
intent.setType("vnd.android-dir/mms-sms"); | |
startActivity(intent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://developer.android.com/resources/tu | |
torials/notepad/index.html - Simple | |
notepad | |
http://www.vogella.de/articles/Android/ar | |
ticle.html - getting started, first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///////////////////////// TestActivity ////////////////////////////////////// | |
package com.begin; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.EditText; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.ContentValues; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
public abstract class AbstractSQLiteSupport { | |
protected SQLiteDatabase db; | |
public AbstractSQLiteSupport(SQLiteDatabase db) { | |
this.db = db; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://rhomobile.com/ | |
http://www.motherapp.com/ | |
http://code.google.com/p/iui/ | |
http://snippetspace.com/ | |
http://www.taplynx.com/ | |
http://www.big5apps.com/ | |
http://www.anscamobile.com/ | |
http://www.nimblekit.com/index.php | |
http://www.sencha.com/ | |
http://www.mosync.com/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here be some notes on the insane set of gymnastics I have to go through every time | |
I fuck up and start recording video with my iPhone held vertically. | |
I do this a LOT. I don't know why it happens. Often I am standing over something and | |
recording it, and the phone doesn't understand that I actually mean to hold it | |
horizontally. | |
META QUESTIONS: | |
Why isn't there a way to prevent the phone from shooting video in vertical format? Who |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UITouch *touch = [touches anyObject]; | |
CGPoint currentPosition = [touch locationInView:[self view]]; | |
CGFloat deltaX = fabsf(gestureStartPoint.x - currentPosition.x); | |
CGFloat deltaY = fabsf(gestureStartPoint.y - currentPosition.y); | |
if (deltaX >= kMinimumGestureLength && deltaY <= kMaximumVariance) { | |
[label setText:@"Horizontal swipe detected"]; | |
[self performSelector:@selector(eraseText) withObject:nil afterDelay:2]; | |
} else if (deltaY >= kMinimumGestureLength && deltaX <= kMaximumVariance) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { | |
if (editingStyle == UITableViewCellEditingStyleDelete) { | |
// Delete the row from the data source | |
NSMutableArray* sect = (NSMutableArray*)[tableContents objectAtIndex:indexPath.section]; | |
[sect removeObjectAtIndex:indexPath.row]; | |
if ([sect count] == 0) | |
[tableContents removeObjectAtIndex:indexPath.section]; | |
[tableView beginUpdates] |