Share to EffectHub.com

You can earn money or coins from your share:)

Tips: you can use Sparticle for uploading away3D effects.

Tips: you can download Sparticle for uploading effects.

Tips: The ActionScript editor is supporting Away3D, Starling, Dragonbones and Flex frameworks.

Tips: paste the web page URL then click button:)

EffectHub.com: Your Best Source for Gaming
Login    or

Android:a demo for SQL

public class SQLhelper extends SQLiteOpenHelper {		public static final String DB_NAME="DB_test";	public static final String TABLE_NAME_STRING="ApkInfo";	public static final String APK_ID="apkid";	public static final String PACKAGE_NAME="packname";	public static final String APP_NAME="appname";	public static final String IS_APP_GAME="isgame";	public static final String IS_APP_CHECKED="ischecked";		public SQLhelper(Context context, String name, CursorFactory factory,			int version) {		super(context, name, factory, version);	}		@Override	public void onCreate(SQLiteDatabase db) {				db.execSQL("create table if not exists "				+TABLE_NAME_STRING+"("+APK_ID+" int primary key,"				+PACKAGE_NAME+" varchar(50),"				+APP_NAME+" varchar(50),"				+IS_APP_GAME+" int,"				+IS_APP_CHECKED+" int)"				);	}	@Override	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {		db.execSQL("drop table if exists "+TABLE_NAME_STRING);		onCreate(db);	}		/**	 * Add a apk into database	 * @param apkInfo app's information	 * @return true if success, else return false;	 */	public boolean InsertApkInfo(ApkInfo apkInfo)	{		 SQLiteDatabase db =getWritableDatabase();		//db.beginTransaction();		 ContentValues values=new ContentValues();		 values.put(APK_ID, apkInfo.apkId);		 values.put(PACKAGE_NAME, apkInfo.packageName);		 values.put(APP_NAME, apkInfo.appName);		 values.put(IS_APP_GAME, 0);		 values.put(IS_APP_CHECKED, 0);		 try {			db.insertOrThrow(TABLE_NAME_STRING, null, values);			return true;		} catch (Exception e) {			return false;		}finally{			db.close();		}		 		 	}}


...

You must Sign up as a member of Effecthub to view the content.

1560 views    1 comments

You must Sign up as a member of Effecthub to join the conversation.

Join Effecthub.com


Or Login with Your Email Address:

Or Sign Up with Your Email Address:
This field must contain a valid email
Password should be at least 1 character

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: views/footer.php

Line Number: 6

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 21

A PHP Error was encountered

Severity: Notice

Message: Undefined index: HTTP_ACCEPT_LANGUAGE

Filename: controllers/topic.php

Line Number: 85