camera - After capture a picture appear in full screen android -


i desire created camera app.for begining created sample apps.i research in github wanna camera snapchat.can prefer idea how can begining ?

in sample apps can take picture preview pictures not good.my picture should appear in full screen in device snapchat. thanks.

i had make custom camera plug cordova , helped me lot: https://github.com/performanceactive/phonegap-custom-camera-plugin/tree/master/platforms/android/src/com/performanceactive/plugins/camera

check customcameraactivity , customcamerapreview, show how customize camera, control preview size, aspect ratio , surface change.

check function in customcamerapreview.java:

  private size optimimalpreviewsize(int targetwidth, int targetheight) {         list<size> sizes = camera.getparameters().getsupportedpreviewsizes();         float targetaspectratio = (float) targetwidth / targetheight;         list<size> sizeswithmatchingaspectratios = filterbyaspectratio(targetaspectratio, sizes);         if (sizeswithmatchingaspectratios.size() > 0) {             return optimalsizeforheight(sizeswithmatchingaspectratios, targetheight);         }         return optimalsizeforheight(sizes, targetheight);     } 

hope helps


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -