Guidelines when using camera in android studio - android-studio

I'm currently working on an app in Android Studio where I need to capture an image using the camera on the phone. The image must be very specific and not contain any background noise.
The way I want to solve this problem is by adding a box to the camera preview indicating the region of interest (ROI). After that the image can be cropped in a way that only the content of the ROI is present.
How do I add this box to define ROI?
In my mind it would be perfect if it was a thin white line.
Can I do it if I use the Image Capture Intent or do I have to create my own camera app?

Check this out - is that what you're after?
http://code.tutsplus.com/tutorials/capture-and-crop-an-image-with-the-device-camera--mobile-11458

Related

Unable to create notification icon on Android Studio using custom image

I am trying to create notification icon using custom png image on Android studio. In Configure Image Asset Screen, when I select my custom image, all it is showing 5 black boxes with white circles in it. Can any one please let me know why it is not selecting custom image.
Below is screenshot of Android Studio
Below is custom image with which I am trying to create notification icon
Can any one please let me know why it is not selecting custom image.
The icon should contain one color (second color should not be present. It should be transparent). My Icon contains red and white both. That is the reason Android studio is not able to identify the image and displaying the whole image as white circle. I asked design team to create an image which has only one color and remaining area as transparent. I created notification icons using that image given by design team.

How to animate textview for example a word "Hello" in android studio without any button?

so basically I want to animate hello which comes from down from the image and stop in the center of image as user launch the app. Can anyone help me. Plus my text view is on relative layout. And also is there any package do i need to import any packages in my main activity.enter image description here
You should consider using GIF. And if you need help creating GIF, you can make a video of the animation, and then convert it to GIF by services available online.

Scaled Assets for Splash Screen in UWP

In appxmanifest file, there are five options for Splash screen : 620x300, 775x375, 930x450, 1240x600 and 2480x1200.
I have the following resolutions in my 15" laptop :
1366x768 (Recommended)
1360x768
1280x720
1280x600
1024x768
800x600
My question is, if I provide all five image in appxmanifest for Splash Screen, how those going to effect my laptop's different reolustion. I looked into MSDN blogs mentioning about some scale factor. I also noticed that, for each splash screen image, corresponds to a name like "SplashScreen.scale-100", "SplashScreen.scale-125", "SplashScreen.scale-150", "SplashScreen.scale-200" and "SplashScreen.scale-400"..
Actually it's a very beginning level question, but I am kind of puzzled up with all those
You have one minute video which explain Scaling and effective pixels in UWP apps. In addition, the Store picks the assets to download based in part of the DPI of the device. Only the assets that best match the device are downloaded. By the way, don't hesite to add a maximum of assets.
To help you, the following extension can generate the different size for you.
UWP Tile Generator Extension for Visual Studio

MergEXT MergZXing layer and barcode not reading

Just started working with this awesome external but have a couple of questions.
When the control is evoked, is it always the top layer or can I have a background transparent image on top of it so I can frame the control nicely?
Also, my testing seems to read most Barcodes but when it comes down to reading Barcodes on hard drives, the control does not want to decode those.... Too dense of bar code pattern?
I am very impressed thus far with the ease of use of your externals. Makes we want to code more for mobile devices!
an overlaying transparent image is not possible, as far as i know.
but couldnĀ“t you use
command mergZXingControlSetRect pLeft,pTop,pRight,pBottom
to define the rect of that scanner after creation
or
command mergZXingControlCreate pLeft,pTop,pRight,pBottom
to create the scanner control in the specified rect.
Set the rect smaller than the width and the height of the screen.
You could then use an underlying image, which is displayed outside of the scanner rect, to show the frame around scanner control. Did not test it myself, but i would assume that this should work.
Unfortunately the native controls in externals and the ones the engine provides are added as views on top of the LiveCode view. That means you can't intermingle LiveCode controls with them. One thing that some users have done is add a web view with a transparent background and a load a png image. If you create the barcode view first and the web view second then the web view will be on top.

Cross ( mobile ) platform image transitions

I'm writing a game that asks the user to click on an image, which then reveals a different image. I'd like to make the transition between the images look like a playing card being turned over on both Android and IOS.
I've done a bit of research, but it all seems to indicate that the "curl" visual effect will do what I want, but is only available on IOS ( I can't test this as I don't have access to a MAC at the moment. )
Is there a cross platform way of doing this "turning a playing card over" sort of transition?
You might scale the (front) image control vertically until it is only 1 line and then scale the second (backside) image from 1 vertical line to its original size.
Only very few visual effects are cross platform. One of them is the reveal up/down/left/right effect. You might use this effect to display a neutral, e.g. gray or blue picture after hiding the front side image and before showing the back side image. Something like this:
lock screen for visual effect
hide img "front"
show img "intermediary"
unlock screen with visual effect reveal left fast
lock screen for visual effect
hide img "intermediary"
show img "back"
unlock screen with visual effect reveal right fast
I know it isn't ideal, but if you want it to be cross platform, you need to find a workaround. Why don't you check for the platform and write a different conditional routine for each platform?
I think the effect you want is flip and yes it's only available on iOS at the moment. There are a couple of iOS visual effects that push the image into a UIView and animate that with native methods. This blog post indicates it would be possible to implement something similar on android but it would need to be in the engine: http://www.techrepublic.com/blog/software-engineer/use-androids-scale-animation-to-simulate-a-3d-flip/

Resources