DanGarrett
Posts: 0
Joined: Wed May 08, 2013 1:45 pm

Camera to Database.

If someone can explain simply (Like a tutorial), how to get a photo from the camera to the appery database ready for use, it would be very appreciated.

I've tried piecing together bits and pieces from the other tutorials about using the camera and file upload, but it's not going well.

Thanks!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Camera to Database.

Hi Dan,

We're working on it. Will update soon.

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

Camera to Database.

Part 1.
1) Create new Database: PhotoDB
2) Add collection: photo
3) Add columns:

  • photo: String

  • Name: String
    Part 2.
    1) Create project

  • add Button -- with name takephoto

  • add Image -- photopreview

  • add Button -- savedb

  • add List -- photolist

    • remove all items except one
  • add Label to the last list item --photoname_label

  • add Camera device service -- mobilecamera1

  • add database service for "PhotoDB" --

  • set service rights for Create (PhotoDB_photos_create_service) and List (PhotoDB_photos_list_service) items in collection "photo"
    2) Create service camera_shot for CameraService
    Map Response:

  • imageDataBase64 to Asset property "photopreview" component

  • imageDataBase64 to new localStorage variable "photo_buffer"
    Now you can create photo and save it to localStorage.
    3) Create create_service based on PhotoDB_photos_create_service:
    Map Request:

  • photoname.Text to Name in Request

  • photo_buffer from localStorage to photo in Request
    4) Create list_service based on PhotoDB_photos_list_service:
    Map response

  • $ to photolist

  • Name to photoname_label.Text
    5) Create Click Event for "savedb" -- invoke create_service and then invoke list_service
    6) Create Load Event for startPage -- invoke list_service

    Now you can test simple application that take shot, show preview and saves it to database.

DanGarrett
Posts: 0
Joined: Wed May 08, 2013 1:45 pm

Camera to Database.

Worked perfectly, great support guys!

Bikram Ray
Posts: 0
Joined: Wed May 22, 2013 5:52 pm

Camera to Database.

Great tutorial it helps a lot.

Marcel
Posts: 0
Joined: Sat Jan 19, 2013 4:29 pm

Camera to Database.

Excellent tutorial and solution.

So easy to upload the photos and attach an own reference no (e.g. order no) into your collection and then easy to download automatically into your ERP system if is the case.
Just simple query the collection and get your photos !!!!!

Was looking for this solution for a good couple of months.
10000000 points from me :-)

Regards,
Marcel

Sylan Sruleam
Posts: 0
Joined: Wed May 29, 2013 3:34 am

Camera to Database.

I cannot see and sub-tasks under localstorage???

and how can I set service rights for create and list?

Sylan Sruleam
Posts: 0
Joined: Wed May 29, 2013 3:34 am

Camera to Database.

any sub-tasks i meant

Anton Artyukh5836028
Posts: 0
Joined: Wed May 08, 2013 12:57 pm

Camera to Database.

Hi Sylan,
About sub-tasks.
Did you mean localStrorage variables?

About rights.
I hope screenshot may help.
Image

Torrence Reed
Posts: 0
Joined: Tue Jun 11, 2013 1:22 am

Camera to Database.

Do you have version of this tutorial with screenshots? Some of the instructions are not to clear to me

Return to “Issues”