// Path: src/com/umang/dashnotifier/provider/NotificationProvider.java
// public class NotificationProvider extends ContentProvider {
// 	private static final String TAG = "NotificationProvider";
// 	private NotificationStore db;
// 	// Used for the UriMacher
// 	private static final int NOTIFICATIONS = 10;
// 	private static final int NOTIFICATION_ID = 20;
// 
// 	// public constants for client development
// 	public static final String AUTHORITY = "com.umang.provider.dashnotifier";
// 	private static final String BASE_PATH = "notifications";
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/" + BASE_PATH);
// 	public static final String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE
// 		      + "/notifications";
// 		  public static final String CONTENT_ITEM_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE
// 		      + "/notification";
// 		  
// 	private static final UriMatcher sURIMatcher = new UriMatcher(UriMatcher.NO_MATCH);
// 	static {
// 		sURIMatcher.addURI(AUTHORITY, BASE_PATH, NOTIFICATIONS);
// 		sURIMatcher.addURI(AUTHORITY, BASE_PATH + "/#", NOTIFICATION_ID);
// 	}
// 	// helper constants for use with the UriMatcher
// 	
// 	//private static final UriMatcher URI_MATCHER;
// 	public boolean check(){
// 		return true;
// 	}
// 
//     @Override
// 	public int delete(Uri uri, String selection, String[] selectionArgs) {
//     	int uriType = sURIMatcher.match(uri);
//         int rowsDeleted = 0;
//         switch (uriType) {
//         case NOTIFICATIONS:
//           rowsDeleted = db.removeNotification(selection, selectionArgs);
//           break;
//         case NOTIFICATION_ID:
//           String id = uri.getLastPathSegment();
//           if (TextUtils.isEmpty(selection)) {
//             rowsDeleted = db.removeNotification(id);
//           } else {
//             rowsDeleted = db.removeNotification(selection, selectionArgs);
//           }
//           break;
//         default:
//           throw new IllegalArgumentException("Unknown URI: " + uri);
//         }
//         if (rowsDeleted > 0)
//         	getContext().getContentResolver().notifyChange(uri, null);
//         return rowsDeleted;
// 	}
// 
// 	@Override
// 	public String getType(Uri arg0) {
// 		return null;
// 	}
// 
// 	@Override
// 	public Uri insert(Uri uri, ContentValues notif) {
// 		
// 		int uriType = sURIMatcher.match(uri);
// 	    long id = 0;
// 	    switch (uriType) {
// 	    case NOTIFICATIONS:
// 	    	id = db.storeNotification(notif);
// 	    	break;
// 	    default:
// 	    	throw new IllegalArgumentException("Unknown URI: " + uri);
// 	    }
// 	    getContext().getContentResolver().notifyChange(uri, null);
// 	    return Uri.parse(BASE_PATH + "/" + id);
// 	}
// 
// 	@Override
// 	public boolean onCreate() {
// 		Log.d(TAG,"ContentProvider created");
// 		this.db = new NotificationStore(this.getContext());
// 		db.open();
// 	    if (this.db == null) {
// 	    	return false;
// 	    }
// 	    return true;
// 	}
// 
// 	@Override
// 	public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
// 		
// 		return db.query(projection, selection, selectionArgs, sortOrder);
// 	}
// 
// 	@Override
// 	public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
// 		int uriType = sURIMatcher.match(uri);
// 	    int rowsUpdated = 0;
// 	    switch (uriType) {
// 	    case NOTIFICATIONS:
// 	      rowsUpdated = db.updateNotification( 
// 	          values, 
// 	          selection,
// 	          selectionArgs);
// 	      break;
// 	    case NOTIFICATION_ID:
// 	      String id = uri.getLastPathSegment();
// 	      if (TextUtils.isEmpty(selection)) {
// 	        rowsUpdated = db.updateNotification(
// 	            values,
// 	            NotifSQLiteHelper.COL_ID + "=" + id, 
// 	            null);
// 	      } else {
// 	        rowsUpdated = db.updateNotification( 
// 	            values,
// 	            NotifSQLiteHelper.COL_ID + "=" + id 
// 	            + " and " 
// 	            + selection,
// 	            selectionArgs);
// 	      }
// 	      break;
// 	    default:
// 	      throw new IllegalArgumentException("Unknown URI: " + uri);
// 	    }
// 	    if (rowsUpdated > 0)
// 	    	getContext().getContentResolver().notifyChange(uri, null);
// 	    return rowsUpdated;
// 		
// 	}
// 	
// }


import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.preference.PreferenceManager;
import com.google.android.apps.dashclock.api.DashClockExtension;
import com.google.android.apps.dashclock.api.ExtensionData;
import com.umang.dashnotifier.provider.NotificationProvider;
package com.umang.dashnotifier;







public class DashNotifierExtension8 extends DashClockExtension {
	static final String extNumber= "8";
	SharedPreferences preferences;
	PackageManager pm ;
	String packageName ;
	Cursor result;
	String[] prefValues;
	
	@Override
	public void onCreate(){
		super.onCreate();
		preferences = PreferenceManager.getDefaultSharedPreferences(this);
		pm = getPackageManager();
		prefValues = getResources().getStringArray(R.array.entryvalues_list_preference);
		
	}
	
	@Override
	protected void onUpdateData(int arg0) {
		ExtensionData data = Commons.publishOrPerish(this, extNumber, preferences, pm, prefValues);
		publishUpdate(data);
			
	}
	
	@Override
    protected void onInitialize(boolean isReconnect) {
		super.onInitialize(isReconnect);
        if (!isReconnect) {
// Path: src/com/umang/dashnotifier/provider/NotificationProvider.java
// public class NotificationProvider extends ContentProvider {
// 	private static final String TAG = "NotificationProvider";
// 	private NotificationStore db;
// 	// Used for the UriMacher
// 	private static final int NOTIFICATIONS = 10;
// 	private static final int NOTIFICATION_ID = 20;
// 
// 	// public constants for client development
// 	public static final String AUTHORITY = "com.umang.provider.dashnotifier";
// 	private static final String BASE_PATH = "notifications";
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/" + BASE_PATH);
// 	public static final String CONTENT_TYPE = ContentResolver.CURSOR_DIR_BASE_TYPE
// 		      + "/notifications";
// 		  public static final String CONTENT_ITEM_TYPE = ContentResolver.CURSOR_ITEM_BASE_TYPE
// 		      + "/notification";
// 		  
// 	private static final UriMatcher sURIMatcher = new UriMatcher(UriMatcher.NO_MATCH);
// 	static {
// 		sURIMatcher.addURI(AUTHORITY, BASE_PATH, NOTIFICATIONS);
// 		sURIMatcher.addURI(AUTHORITY, BASE_PATH + "/#", NOTIFICATION_ID);
// 	}
// 	// helper constants for use with the UriMatcher
// 	
// 	//private static final UriMatcher URI_MATCHER;
// 	public boolean check(){
// 		return true;
// 	}
// 
//     @Override
// 	public int delete(Uri uri, String selection, String[] selectionArgs) {
//     	int uriType = sURIMatcher.match(uri);
//         int rowsDeleted = 0;
//         switch (uriType) {
//         case NOTIFICATIONS:
//           rowsDeleted = db.removeNotification(selection, selectionArgs);
//           break;
//         case NOTIFICATION_ID:
//           String id = uri.getLastPathSegment();
//           if (TextUtils.isEmpty(selection)) {
//             rowsDeleted = db.removeNotification(id);
//           } else {
//             rowsDeleted = db.removeNotification(selection, selectionArgs);
//           }
//           break;
//         default:
//           throw new IllegalArgumentException("Unknown URI: " + uri);
//         }
//         if (rowsDeleted > 0)
//         	getContext().getContentResolver().notifyChange(uri, null);
//         return rowsDeleted;
// 	}
// 
// 	@Override
// 	public String getType(Uri arg0) {
// 		return null;
// 	}
// 
// 	@Override
// 	public Uri insert(Uri uri, ContentValues notif) {
// 		
// 		int uriType = sURIMatcher.match(uri);
// 	    long id = 0;
// 	    switch (uriType) {
// 	    case NOTIFICATIONS:
// 	    	id = db.storeNotification(notif);
// 	    	break;
// 	    default:
// 	    	throw new IllegalArgumentException("Unknown URI: " + uri);
// 	    }
// 	    getContext().getContentResolver().notifyChange(uri, null);
// 	    return Uri.parse(BASE_PATH + "/" + id);
// 	}
// 
// 	@Override
// 	public boolean onCreate() {
// 		Log.d(TAG,"ContentProvider created");
// 		this.db = new NotificationStore(this.getContext());
// 		db.open();
// 	    if (this.db == null) {
// 	    	return false;
// 	    }
// 	    return true;
// 	}
// 
// 	@Override
// 	public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
// 		
// 		return db.query(projection, selection, selectionArgs, sortOrder);
// 	}
// 
// 	@Override
// 	public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
// 		int uriType = sURIMatcher.match(uri);
// 	    int rowsUpdated = 0;
// 	    switch (uriType) {
// 	    case NOTIFICATIONS:
// 	      rowsUpdated = db.updateNotification( 
// 	          values, 
// 	          selection,
// 	          selectionArgs);
// 	      break;
// 	    case NOTIFICATION_ID:
// 	      String id = uri.getLastPathSegment();
// 	      if (TextUtils.isEmpty(selection)) {
// 	        rowsUpdated = db.updateNotification(
// 	            values,
// 	            NotifSQLiteHelper.COL_ID + "=" + id, 
// 	            null);
// 	      } else {
// 	        rowsUpdated = db.updateNotification( 
// 	            values,
// 	            NotifSQLiteHelper.COL_ID + "=" + id 
// 	            + " and " 
// 	            + selection,
// 	            selectionArgs);
// 	      }
// 	      break;
// 	    default:
// 	      throw new IllegalArgumentException("Unknown URI: " + uri);
// 	    }
// 	    if (rowsUpdated > 0)
// 	    	getContext().getContentResolver().notifyChange(uri, null);
// 	    return rowsUpdated;
// 		
// 	}
// 	
// }


// Path: src/com/umang/dashnotifier/DashNotifierExtension8.java
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.preference.PreferenceManager;
import com.google.android.apps.dashclock.api.DashClockExtension;
import com.google.android.apps.dashclock.api.ExtensionData;
import com.umang.dashnotifier.provider.NotificationProvider;

package com.umang.dashnotifier;







public class DashNotifierExtension8 extends DashClockExtension {
	static final String extNumber= "8";
	SharedPreferences preferences;
	PackageManager pm ;
	String packageName ;
	Cursor result;
	String[] prefValues;
	
	@Override
	public void onCreate(){
		super.onCreate();
		preferences = PreferenceManager.getDefaultSharedPreferences(this);
		pm = getPackageManager();
		prefValues = getResources().getStringArray(R.array.entryvalues_list_preference);
		
	}
	
	@Override
	protected void onUpdateData(int arg0) {
		ExtensionData data = Commons.publishOrPerish(this, extNumber, preferences, pm, prefValues);
		publishUpdate(data);
			
	}
	
	@Override
    protected void onInitialize(boolean isReconnect) {
		super.onInitialize(isReconnect);
        if (!isReconnect) {
            addWatchContentUris(new String[]{NotificationProvider.CONTENT_URI.toString()});