I have created the content provider class below.
Now the content provider has to be registered in the manifest.
Thursday, July 3, 2014
Project Database - Step 4
Below is an entity relationship diagram with the ProjectItem table created by Gliffy.
![]() |
ERD Diagram with data types |
I've decided to do all of my dates in UTC format and store them as text, as discussed in stack overflow post. I've decided to have a field in case I store an icon for each task later.
One of the more unique things I'm introducing into this app is the ParentProjectItem. Because larger tasks can generally infinitely be broken up into sub tasks, I want to form a ProjectItem heiarchy. ProjectItems that have a ProjectItemParentID of 0 are root level ProjectItems, sub ProjectItems will have the idea of their parent stored in this field. I have tried to edit the ERD diagram to reflect this.
![]() |
Tried to add the one-to-one relationship, this will get very interesting in the iOS storyboarding! |
Now it is time to create the Java class that has the code that will create this table. I will upload it to my newly created GitHub repository and you can see the class ProjectItemTable.java below.
The class above creates or performs updates on the ProjectItem table in the database. It is good practice to have one class to each table, as I add tables I will update my diagrams and add classes to my code.
Stack Overflow
I had to join StackOverflow, it's about time I build some reputation on that site and become a contributor rather than just a spectator! Find me here.
Udacity Android Course
I was contacted by someone and given a link to about the coolest Android course I've seen yet, I will be looking into it further. This course can be found at udacity and the free courseware is certainly enough to entertain me for a few hours.
Git Repository
I have been dreading this moment but maybe I will just tackle this now. How am I going to share source code?
Well, I think I am going to use Git. The information about Git is online. I am using Eclipse and when I did a search I saw another vogella tutorial. I liked the last one so let's do that. This tutorial is about EGit, an Eclipse plugin, that I first must install.
EGit Vogella Tutorial
So first I need my Eclipse in line so I go to help, install software, hit the add button and put in the update site.
Great, now I will just install everything.
That was a huge pain in the backside! But I figured it out! Here is my github.com repository that I pushed from Eclipse using the above plugins.
Well, I think I am going to use Git. The information about Git is online. I am using Eclipse and when I did a search I saw another vogella tutorial. I liked the last one so let's do that. This tutorial is about EGit, an Eclipse plugin, that I first must install.
EGit Vogella Tutorial
So first I need my Eclipse in line so I go to help, install software, hit the add button and put in the update site.
![]() |
Adding an Eclipse Plugin |
That was a huge pain in the backside! But I figured it out! Here is my github.com repository that I pushed from Eclipse using the above plugins.
I also discovered a nice tool called 'GIST' which allows me to embed code excerpts. Or I can create a link like this Link to My Code.
Now I can publish my samples and have version control!
This user guide was the most helpful thing in setting up EGit with Eclipse.
This user guide was the most helpful thing in setting up EGit with Eclipse.
Changing Everything
I have decided I will create a new project before I get too deeply embedded into this one. I am going to call it ProjectStarter. The projects or tasks are being renamed to 'ProjectItems'. Deciding on this entity naming scheme will help me to keep things consistent throughout the project. I am also changing my reverse domain to com.profcodegirl.projectstarter which effects the name of my packages.
Building the Home Screen Custom List with SQLite
Reflecting on how I want my list to display this morning and I'd like to do a little work on the home page list view. It should show the soonest to be started subtask on the master list, the time it's going to start and whether there is a reminder attached to that time displayed and easily edited (check box calendar control), and tasks should have a status. Because sometimes a project is on hold because you are waiting for something beyond your control. If this is the case, I want the status to indicate this fact and somehow a time limit or a way to change this status.
While I'm creating this custom ListView I decided to go ahead and get the sqlite database going as well. I read on the Android developer site for an hour or so to get an idea of what I am doing. I finally settled once again on this excellent tutorial which describes how to do asynchronous queries on the database and has a clear to follow narrative on how everything works.
Excellent Vogella Tutorial
As I'm doing the tutorial, I am recrafting the code to fit into my project and will utilize Fragments in the hope that I can make the orientation and tablet layouts cool later.
Step 1: Created a project with a main activity, I renamed the main acitivity MainProjectList. This created a .java source file called MainProjectList.java, and two .xml files, one for the activity layout and one for the fragment.
Step 2: To stay in line with the Vogella tutorial, I am going to also create a details activity, this would show the detail view of a project. This is a little ahead of where I'm at in concept (haven't even thought of what the detail of a project item should look like yet), but that's OK. I right clicked and added an activity called ProjectItemDetail.
Step 3: Create a package for the database classes com.malevolentmare.taskstarter.database.
While I'm creating this custom ListView I decided to go ahead and get the sqlite database going as well. I read on the Android developer site for an hour or so to get an idea of what I am doing. I finally settled once again on this excellent tutorial which describes how to do asynchronous queries on the database and has a clear to follow narrative on how everything works.
Excellent Vogella Tutorial
![]() |
I am doing the Vogella tutorial, I also want to utilize Fragments, Eclipse put those in for me |
As I'm doing the tutorial, I am recrafting the code to fit into my project and will utilize Fragments in the hope that I can make the orientation and tablet layouts cool later.
Step 1: Created a project with a main activity, I renamed the main acitivity MainProjectList. This created a .java source file called MainProjectList.java, and two .xml files, one for the activity layout and one for the fragment.
Step 2: To stay in line with the Vogella tutorial, I am going to also create a details activity, this would show the detail view of a project. This is a little ahead of where I'm at in concept (haven't even thought of what the detail of a project item should look like yet), but that's OK. I right clicked and added an activity called ProjectItemDetail.
![]() |
Adding the activity also adds a layout and a fragment .xml file, cool! |
Step 4: Add a class to represent the Project table. This table will hold individual records that represent a project. I will have to put some thought into what fields I want this table to have, I will also have to look at some SQLite documentation online.
Step 4 is going to warrant its own blog post because I have to consider what fields I want in a database. I know from my limited experience that changing this can be a pain. If you change the structure of an SQLite database, you will find yourself having to uninstall and reinstall your app for testing, after a series of inexplicable crashes.
Step 4 is going to warrant its own blog post because I have to consider what fields I want in a database. I know from my limited experience that changing this can be a pain. If you change the structure of an SQLite database, you will find yourself having to uninstall and reinstall your app for testing, after a series of inexplicable crashes.
Tuesday, July 1, 2014
App Idea
The idea behind this app I am going to build is simple (for now). I find myself struggling with to do lists because they do not address my needs. I find myself in the midst of many ongoing projects. Many of these projects get broken down into sub-projects and sometimes these sub-projects are put on hold. Ultimately, using a to-do list and setting a reminder feels backwards. I am not inclined to care when a project is due, only when I should start it, and if the project is put on hold, I want to know when to start it again. I would like a calendar view of when I am starting and working on projects so I can easilly schedule a time slot and I'd like to have a very easy set reminder.
There are pie in the sky ideas as well, like wouldn't it be cool if it interfaced with google calendar, etc.
My biggest goal with this project is simply to bring it to completion using Android and iOS and heck with Visual Basic perhaps even Windows phone. This is an exercise for me to utilize my programming skills and practice.
I will start with the Android platform.
I am using a Mac machine loaded with ADT Bundle.
The ADT Bundle is a version of Eclipse with the Android SDK pre-installed, at the time of this writing it can be located http://developer.android.com/sdk/index.html.
Here we go!
There are pie in the sky ideas as well, like wouldn't it be cool if it interfaced with google calendar, etc.
My biggest goal with this project is simply to bring it to completion using Android and iOS and heck with Visual Basic perhaps even Windows phone. This is an exercise for me to utilize my programming skills and practice.
I will start with the Android platform.
I am using a Mac machine loaded with ADT Bundle.
The ADT Bundle is a version of Eclipse with the Android SDK pre-installed, at the time of this writing it can be located http://developer.android.com/sdk/index.html.
Here we go!
WireFrameSketcher
I decided I'd like to design the look and feel of my app first. I'm trying a product called WireFrameSketcher. I installed the Eclipse plugin for this product and created a wireframe project of the Android KitKat variety.
Here is the home screen I made in the wireframing suite, also I'm showing it inside of the Eclipse development environment.
![]() |
The Sketch I Built of My Homescreen While Playing with WireframeSketcher |
I like the tool and it's gotten my creative juices flowing into overdrive with ideas. I now am going to divert to starting a project and putting some actual layout .xml files together. I have decided I want my projects to be in a custom list bound to a MySQL table. I can't really do anything until I get at least this much setup. So I'm going to embark on that journey and build something similar to what I've created in the wireframe. A home screen with a list of projects, an optional icon, a project title, project description, and a checkbox to indicate whether or not the project is finished.
Hmmm.... this makes me think about the verbage. Should I call them projects? Tasks?
Subscribe to:
Posts (Atom)