JSON error capturing image in Phonegap | Android

04/25/2012 § Leave a comment

Here is solution for those who get JSON error, or some undefined…..
One thing to remember is to input FILE.URI, targetwidth and targetheight…. It took about one day before I found that the code was right, but only because of that i hadn’t included width and height it was failing.

Take in consideration that.
By the way we are using phonegap version 1.5.0 (or cordova as it called now)

navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality : 75,
destinationType : Camera.DestinationType.FILE_URI,
sourceType : Camera.PictureSourceType.CAMERA,
encodingType: Camera.EncodingType.JPEG,
targetWidth: 100,
targetHeight: 100 }

Good Luck


We have created Android Account

03/24/2012 § Leave a comment


We have created an account for Android Market or “Play” as it named now. So, one step toward uploading the “Beta Version of Epilepsy App” is done. The estimated date for sending our “BETA” version to the market is Monday, 26.03.2012. By this act we would like to mark “International Purple Day”.

From Monday, “The Big Day” , we would like that you will support us. Download application and send us reply. We need your precious feedback in order to make our “Epilepsy App” application better. No matter if you have or not epilepsy, this app can be tested by anyone. Together we can get better solution. Let us know that we do not know or didn’t recognized.

If you want to make some contribution, it is possible. If you are aware of some icon design we would be grateful for your volunteer work and designing icons that can be used in our Epilepsy App.

Write us letter, email…… if you have suggestions, advices, questions…. adiljan.abdurihim@hig.no , andrius.januska@hig.no

Sincerely, Epilepsy App bachelor thesis team.

Multiple Contacts for warning

03/22/2012 § 1 Comment

We are glad to present the possibility of defining multiple mobile numbers for warning. Epilepsy App is moving towards to it’s beta version that will be sent to Android Market by the beginning of next week.

Upgrading to PhoneGap 1.5.0

03/22/2012 § 1 Comment

The upgrade of PhoneGap hasbeen decided in order to operate on newer version. As a second probable problem solution can be contacts on mobile that do not display on Galaxy S2.

Things to note before you upgrade from 1.3.0 -> 1.5.0 :

The .jar .xml and .js files for phonegap 1.5.0 is named cordova, so do not search for something like phonegap-(version). Interesting but logically we thought it would be like that….

The java files has to implement this import:

import org.apache.cordova.DroidGap;

Good luck !!!

!!! W : When you make upgrade unfortunately you have to make some changes in own created plugin. Apparently they are not working…. If we solve this problem it will be posted on our blog.

Tips | TimePicker

03/20/2012 § Leave a comment

Tips from external server became an issue because of letters. When we were testing tips with Norwegian letters we had a problem displaying tips… the database was just ignoring the letters “å,ø,æ”


TimePicker… because of some difficulties we had to present own defined TimePicker, even though it seems to be very easy it took some time because of “var” in javascript that is universal for strings, integers. Later we have discovered the popup way of implementation was crashing with some other parts… that led to changes in layout, totally.

The Service Plugin for PhoneGap

02/28/2012 § Leave a comment

The Epilepsy App is on it’s way to take more interesting shape after several problems and success.

After several tries and tests our plugin for the service wasn’t working !!! So, the alternative way have been used to solve the problem. Yesterday, as we had a meeting with our supervisor the problem was reported. The explanation of the code lead to a successful solution of the plugin. So, it’s working. We have a a service plugin for the PhoneGap.

And once more I said it was so simple and I couldn’t see it event thought not logical !!! REMEMBER Use context !!!


02/22/2012 § Leave a comment

The Service in PhoneGap doesn’t exist, or at least we couldn’t find plugin or possible solution. This made a huge trouble for making our app work even if it is inactive. No, reminders will be received. Having this trouble we tried to create plugin…. hmm.. it wasn’t so easy !!! We had a plenty small problems….. so the decision was to run it from very first activity before the PhoneGap, index.html is ran.

Although we have solved the problem of service we faced a new problem. PhoneGap and Android native SQLite database location were different. Additionally the database name given in code are different from that is created.

For example: our database created in PhoneGap is named “medicines” but the database name created as a file strangely named “0000000000000001” ?!!! yeah, it took long time before I get different names debugging the app !!!

Now, Service, Status bar notification, DB check are working except that after registering a new medicine data it doesn’t run notification before the service will be started again, that’s mean that application should be started again. This should be resolved !!!

Where Am I?

You are currently browsing the PhoneGap category at EPILEPSY APP.