-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds auto upload settings to preference screen * adds NEW_PICTURE broadcast receiver * adds upload service * adds upload settings preference fragment * adds hda and share list fetching to upload settings * adds sqlite db for storing image paths * adds custom upload queue * implements upload manager and server connection in background service * fix the UI stuck on file uploads * fix multiple files uploading at the same time * code refactoring * adds upload only on wifi preference option * adds api-19 to travis.yml * adds Job for tracking changes in images content uri * adds job scheduling to the application class * adds net connnectivity job * adds permission checker to auto upload settings
- Loading branch information
Showing
30 changed files
with
1,814 additions
and
162 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
src/main/java/org/amahi/anywhere/bus/UploadSettingsOpeningEvent.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright (c) 2014 Amahi | ||
* | ||
* This file is part of Amahi. | ||
* | ||
* Amahi is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Amahi is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Amahi. If not, see <http ://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.amahi.anywhere.bus; | ||
|
||
public class UploadSettingsOpeningEvent implements BusEvent { | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.amahi.anywhere.db; | ||
|
||
import android.content.Context; | ||
import android.database.sqlite.SQLiteDatabase; | ||
import android.database.sqlite.SQLiteOpenHelper; | ||
|
||
/** | ||
* SQLite db for maintaining image uploads in a persistent database. | ||
* Query methods managed by {@link UploadQueueDbHelper UploadQueueDbHelper}. | ||
*/ | ||
|
||
class UploadQueueDb extends SQLiteOpenHelper { | ||
|
||
// Database version | ||
private static final int DATABASE_VERSION = 1; | ||
|
||
// Database Name | ||
private static final String DATABASE_NAME = "AMAHI_ANYWHERE_DATABASE"; | ||
|
||
// Table name | ||
static final String TABLE_NAME = "UPLOAD_QUEUE_TABLE"; | ||
|
||
// column names | ||
static final String KEY_ID = "id"; | ||
static final String KEY_FILE_PATH = "file_path"; | ||
|
||
UploadQueueDb(Context context) { | ||
super(context, DATABASE_NAME, null, DATABASE_VERSION); | ||
} | ||
|
||
@Override | ||
public void onCreate(SQLiteDatabase db) { | ||
String CREATE_TABLE = "CREATE TABLE " + TABLE_NAME + "(" | ||
+ KEY_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " | ||
+ KEY_FILE_PATH + " VARCHAR(200) NOT NULL)"; | ||
|
||
db.execSQL(CREATE_TABLE); | ||
} | ||
|
||
@Override | ||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { | ||
} | ||
|
||
} |
Oops, something went wrong.