├── .gitattributes ├── settings.gradle ├── ImapNote2 ├── libs │ ├── mail.jar │ ├── activation.jar │ ├── additionnal.jar │ ├── commons-io-2.4.jar │ ├── javamaildir-0.6.jar │ └── android-support-v4.jar ├── src │ └── main │ │ ├── res │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_action_about.png │ │ │ ├── ic_action_color.png │ │ │ ├── ic_action_login.png │ │ │ ├── ic_action_new.png │ │ │ ├── ic_action_save.png │ │ │ ├── ic_action_delete.png │ │ │ ├── ic_action_refresh.png │ │ │ ├── ic_action_search.png │ │ │ └── ic_action_user_edit.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ │ ├── xml │ │ │ ├── searchable.xml │ │ │ ├── authenticator.xml │ │ │ ├── syncadapter.xml │ │ │ └── account_preferences.xml │ │ ├── menu │ │ │ ├── newnote.xml │ │ │ ├── list.xml │ │ │ └── detail.xml │ │ ├── layout │ │ │ ├── note_detail.xml │ │ │ ├── new_note.xml │ │ │ ├── note_element.xml │ │ │ ├── main.xml │ │ │ └── account_selection.xml │ │ └── values-v14 │ │ │ └── styles.xml │ │ ├── java │ │ └── com │ │ │ └── Pau │ │ │ └── ImapNotes2 │ │ │ ├── Miscs │ │ │ ├── ImapNotes2Result.java │ │ │ ├── Sticky.java │ │ │ ├── OneNote.java │ │ │ ├── SyncThread.java │ │ │ ├── ImapNotesAuthenticatorService.java │ │ │ ├── Imaper.java │ │ │ └── UpdateThread.java │ │ │ ├── Sync │ │ │ ├── SyncService.java │ │ │ ├── StubProvider.java │ │ │ ├── SyncAdapter.java │ │ │ └── SyncUtils.java │ │ │ ├── ImapNotes2.java │ │ │ ├── NewNoteActivity.java │ │ │ ├── Data │ │ │ ├── ImapNotes2Account.java │ │ │ ├── ConfigurationFile.java │ │ │ └── NotesDb.java │ │ │ ├── NoteDetailActivity.java │ │ │ ├── NotesListAdapter.java │ │ │ ├── AccontConfigurationActivity.java │ │ │ └── Listactivity.java │ │ └── AndroidManifest.xml └── build.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── README.md ├── gradlew.bat ├── gradlew └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | *.bat text eol=crlf -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':ImapNote2' 2 | -------------------------------------------------------------------------------- /ImapNote2/libs/mail.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/libs/mail.jar -------------------------------------------------------------------------------- /ImapNote2/libs/activation.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/libs/activation.jar -------------------------------------------------------------------------------- /ImapNote2/libs/additionnal.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/libs/additionnal.jar -------------------------------------------------------------------------------- /ImapNote2/libs/commons-io-2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/libs/commons-io-2.4.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /ImapNote2/libs/javamaildir-0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/libs/javamaildir-0.6.jar -------------------------------------------------------------------------------- /ImapNote2/libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/libs/android-support-v4.jar -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_about.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_color.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_login.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_new.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_save.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_delete.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_search.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/drawable-mdpi/ic_action_user_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/N0ury/ImapNote2/HEAD/ImapNote2/src/main/res/drawable-mdpi/ic_action_user_edit.png -------------------------------------------------------------------------------- /ImapNote2/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ImapNotes2 4 | 5 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/xml/searchable.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Oct 21 11:34:03 PDT 2015 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip 7 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/menu/newnote.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/xml/authenticator.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/xml/syncadapter.xml: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /ImapNote2/src/main/java/com/Pau/ImapNotes2/Miscs/ImapNotes2Result.java: -------------------------------------------------------------------------------- 1 | package com.Pau.ImapNotes2.Miscs; 2 | 3 | import javax.mail.Folder; 4 | 5 | public class ImapNotes2Result { 6 | 7 | public int returnCode; 8 | public String errorMessage; 9 | public Long UIDValidity; 10 | public boolean hasUIDPLUS; 11 | public Folder notesFolder; 12 | 13 | public ImapNotes2Result () { 14 | returnCode = -1; 15 | errorMessage = ""; 16 | UIDValidity = (long) -1; 17 | hasUIDPLUS = true; 18 | notesFolder = null; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/xml/account_preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # files for the dex VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # generated files 12 | bin/ 13 | build/ 14 | gen/ 15 | obj/ 16 | .gradle/ 17 | 18 | # Local configuration file (sdk path, etc) 19 | local.properties 20 | project.properties 21 | 22 | # Eclipse project files 23 | .settings/ 24 | .classpath 25 | .project 26 | 27 | # Proguard folder generated by Eclipse 28 | proguard/ 29 | 30 | # Intellij project files 31 | *.iml 32 | *.ipr 33 | *.iws 34 | .idea/ 35 | 36 | # Gradle wrapper 37 | gradle/wrapper/gradle/ 38 | gradle/wrapper/gradlew* 39 | 40 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | #e8d731 8 | 9 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/layout/note_detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/layout/new_note.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ImapNote2/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 21 5 | buildToolsVersion "23.0.2" 6 | 7 | defaultConfig { 8 | applicationId "com.Pau.ImapNotes2" 9 | minSdkVersion 16 10 | targetSdkVersion 16 11 | } 12 | 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 17 | } 18 | } 19 | 20 | packagingOptions { 21 | exclude 'META-INF/LICENSE.txt' 22 | } 23 | } 24 | 25 | dependencies { 26 | compile 'com.android.support:support-v4:21.0.3' 27 | compile files('libs/activation.jar') 28 | compile files('libs/additionnal.jar') 29 | compile files('libs/commons-io-2.4.jar') 30 | compile files('libs/javamaildir-0.6.jar') 31 | compile files('libs/mail.jar') 32 | } 33 | -------------------------------------------------------------------------------- /ImapNote2/src/main/java/com/Pau/ImapNotes2/Miscs/Sticky.java: -------------------------------------------------------------------------------- 1 | package com.Pau.ImapNotes2.Miscs; 2 | 3 | public class Sticky { 4 | 5 | private static String text; 6 | private static String position; 7 | private static String color; 8 | 9 | public Sticky() { 10 | Sticky.text = ""; 11 | Sticky.position = "0 0 0 0"; 12 | Sticky.color = "YELLOW"; 13 | } 14 | 15 | public Sticky(String text, String position, String color) { 16 | Sticky.text = text; 17 | Sticky.position = position; 18 | Sticky.color = color; 19 | } 20 | 21 | public String GetPosition(){ 22 | return Sticky.position; 23 | } 24 | 25 | public String GetText(){ 26 | return Sticky.text; 27 | } 28 | 29 | public String GetColor(){ 30 | return Sticky.color; 31 | } 32 | 33 | public void SetText(String text){ 34 | Sticky.text = text; 35 | } 36 | 37 | public void SetPosition(String position){ 38 | Sticky.position = position; 39 | } 40 | 41 | public void SetColor(String color){ 42 | Sticky.color = color; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/values-v14/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | #e8d731 6 | 7 | 12 | 13 | 14 | 18 | 19 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/layout/note_element.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 21 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /ImapNote2/src/main/java/com/Pau/ImapNotes2/Sync/SyncService.java: -------------------------------------------------------------------------------- 1 | package com.Pau.ImapNotes2.Sync; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.util.Log; 7 | 8 | public class SyncService extends Service { 9 | public static final String SYNC_FINISHED = "SYNC_FINISHED"; 10 | private static final String TAG = "SyncService"; 11 | 12 | private static final Object sSyncAdapterLock = new Object(); 13 | private static SyncAdapter sSyncAdapter = null; 14 | 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | Log.d(TAG, "Service created"); 19 | synchronized (sSyncAdapterLock) { 20 | if (sSyncAdapter == null) { 21 | sSyncAdapter = new SyncAdapter(getApplicationContext(), true); 22 | } 23 | } 24 | } 25 | 26 | @Override 27 | public void onDestroy() { 28 | super.onDestroy(); 29 | Log.d(TAG, "Service destroyed"); 30 | } 31 | 32 | @Override 33 | public IBinder onBind(Intent intent) { 34 | Log.d(TAG, "Service is returning IBinder"); 35 | return sSyncAdapter.getSyncAdapterBinder(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/menu/list.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 15 | 16 | 17 | 22 | 23 | 24 | 30 | 31 | 32 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/menu/detail.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | 19 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ImapNote2/src/main/java/com/Pau/ImapNotes2/Miscs/OneNote.java: -------------------------------------------------------------------------------- 1 | package com.Pau.ImapNotes2.Miscs; 2 | 3 | import java.util.HashMap; 4 | 5 | public class OneNote extends HashMap{ 6 | 7 | /** 8 | * 9 | */ 10 | private static final long serialVersionUID = 1L; 11 | 12 | public OneNote(){ 13 | super(); 14 | this.put("title", "No Title"); 15 | this.put("date", "No Date"); 16 | this.put("uid", "0"); 17 | 18 | } 19 | 20 | public OneNote(String title, String date, String uid){ 21 | super(); 22 | this.put("title", title); 23 | this.put("date", date); 24 | this.put("uid", uid); 25 | 26 | } 27 | 28 | public String GetTitle(){ 29 | return this.get("title"); 30 | } 31 | 32 | public String GetDate(){ 33 | return this.get("date"); 34 | } 35 | 36 | public String GetUid(){ 37 | return this.get("uid"); 38 | } 39 | 40 | public void SetTitle(String title){ 41 | this.put("title", title); 42 | } 43 | 44 | public void SetDate(String date){ 45 | this.put("date", date); 46 | } 47 | 48 | public void SetUid(String uid){ 49 | this.put("uid", uid); 50 | } 51 | 52 | @Override 53 | public String toString() { 54 | return ("Title:"+this.GetTitle()+ 55 | " Date: "+ this.GetDate() + 56 | " Uid: "+ this.GetUid()); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /ImapNote2/src/main/java/com/Pau/ImapNotes2/ImapNotes2.java: -------------------------------------------------------------------------------- 1 | package com.Pau.ImapNotes2; 2 | 3 | import java.util.ArrayList; 4 | 5 | import com.Pau.ImapNotes2.Data.ConfigurationFile; 6 | import com.Pau.ImapNotes2.Miscs.Imaper; 7 | import com.Pau.ImapNotes2.Miscs.OneNote; 8 | 9 | import android.app.Application; 10 | import android.content.Context; 11 | 12 | public class ImapNotes2 extends Application { 13 | 14 | private ConfigurationFile thisSessionConfigurationFile; 15 | private Imaper thisSessionImapFolder; 16 | private ArrayList noteList; 17 | private static Context context; 18 | 19 | public void onCreate(){ 20 | super.onCreate(); 21 | ImapNotes2.context = getApplicationContext(); 22 | } 23 | 24 | public static Context getAppContext() { 25 | return ImapNotes2.context; 26 | } 27 | 28 | public void SetConfigurationFile(ConfigurationFile currentSettings){ 29 | this.thisSessionConfigurationFile = currentSettings; 30 | } 31 | 32 | public ConfigurationFile GetConfigurationFile(){ 33 | return this.thisSessionConfigurationFile; 34 | } 35 | 36 | public void SetImaper(Imaper currentImaper){ 37 | this.thisSessionImapFolder = currentImaper; 38 | } 39 | 40 | public Imaper GetImaper(){ 41 | return this.thisSessionImapFolder; 42 | } 43 | 44 | public void SetNotesList(ArrayList currentNotesList){ 45 | this.noteList = currentNotesList; 46 | } 47 | 48 | public ArrayList GetNotesList(){ 49 | return this.noteList; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /ImapNote2/src/main/java/com/Pau/ImapNotes2/Sync/StubProvider.java: -------------------------------------------------------------------------------- 1 | package com.Pau.ImapNotes2.Sync; 2 | 3 | import android.content.ContentProvider; 4 | import android.content.ContentValues; 5 | import android.database.Cursor; 6 | import android.net.Uri; 7 | 8 | /* 9 | * Define an implementation of ContentProvider that stubs out 10 | * all methods 11 | */ 12 | public class StubProvider extends ContentProvider { 13 | /* 14 | * Always return true, indicating that the 15 | * provider loaded correctly. 16 | */ 17 | @Override 18 | public boolean onCreate() { 19 | return true; 20 | } 21 | /* 22 | * Return no type for MIME type 23 | */ 24 | @Override 25 | public String getType(Uri uri) { 26 | return null; 27 | } 28 | /* 29 | * query() always returns no results 30 | * 31 | */ 32 | @Override 33 | public Cursor query( 34 | Uri uri, 35 | String[] projection, 36 | String selection, 37 | String[] selectionArgs, 38 | String sortOrder) { 39 | return null; 40 | } 41 | /* 42 | * insert() always returns null (no URI) 43 | */ 44 | @Override 45 | public Uri insert(Uri uri, ContentValues values) { 46 | return null; 47 | } 48 | /* 49 | * delete() always returns "no rows affected" (0) 50 | */ 51 | @Override 52 | public int delete(Uri uri, String selection, String[] selectionArgs) { 53 | return 0; 54 | } 55 | /* 56 | * update() always returns "no rows affected" (0) 57 | */ 58 | public int update( 59 | Uri uri, 60 | ContentValues values, 61 | String selection, 62 | String[] selectionArgs) { 63 | return 0; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /ImapNote2/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 16 | 17 | 25 | 26 | 27 | 28 | 31 | 32 | 37 | 38 |