DJArema
Posts: 0
Joined: Mon Jan 27, 2014 10:18 pm

Problem with Camera Service & save to localstorage

Hello everybody,

i hope someone can help me with my problem.
I'm a really newbie in programming android.
To insert the camera service and make a layout for my app was very easy with appery.io .
But now i will realise the following task's for my app, but i have no idea how to:-(
My Layout has a INPUTFIELD (called inputNR) and many buttons like "takebill", "takesn" and much more ....
in the inputfield i would like to enter a number und when i press the "takebill"-button, the app should open the camera.
then the Picture i take with the camera should become a name that contains the number from the inputfield and then "_bill.jpg" (in example "50967_bill.jpg")
i have found a similar code on another website und will try to integrate this in my project.
Here is the code that i will use:

-----------------------------------------------------------------

//camera stuff
Intent imageIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());

//folder stuff
File imagesFolder = new File(Environment.getExternalStorageDirectory(), "MyImages");
imagesFolder.mkdirs();

filePath = "/MyImages/QR" + timeStamp + ".png" ;
File image = new File(imagesFolder, "QR" + timeStamp + ".png");
Uri uriSavedImage = Uri.fromFile(image);

imageIntent.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);
startActivityForResult(imageIntent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);

-------------------------------------------------------------------

What i have to change so that they work with the integrated camera service in appery.io and where i must insert this code ?

i know it's a big project for a newbie like me, but i hope someone can help to finish my project sometime.....

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Problem with Camera Service & save to localstorage

This looks like Android (Java) code.. that's outside the scope of our support (http://docs.appery.io/support-policy/). You also should keep in mind that an app in Appery.io is built with HTML, JavaScript, CSS and PhoneGap APIs.

Return to “Issues”