With more and more apps like Instagram flooding the market, having a square mode camera in your application is just as common as it gets. However, as easy may it seem, coding a custom square mode camera with precise image capturing has proven to be a pain in the a** for many developers. But as they say, your solution is just a step away when you give an honest attempt. We recently implemented the square mode camera for one of our dear customers ‘Krumbb’. It was quite a challenge in the beginning to find a workaround with the calculations for the square camera, but the end result was sweet. We decided to jot down the procedure and steps to develop a custom camera in square mode for Android, like Instagram.
To implement a custom camera like that of Instagram in square mode, we open a custom camera in full screen mode. Now, the trick is to calculate the bottom view height instead of the square screen height. In our example, we have used Action Bar of 50 pixels, so in that case you’ll have to subtract that value too in your calculation. Read below for a detailed description on how to implement this functionality,
By default, Android custom camera is not in square mode.
To convert it to Instagram square mode option, we need to open camera in full screen. After the picture has been captured, calculations are done to make both height and width of the picture equal. Equal height and width results in square mode. Just what we wanted.
Anmol & his bunch of designers at 42Works surpassed all my expectations — be it design, speed or delivery. His organisation has certainly been the best experience I have encountered with outsourcing. I will certainly recommend them again. They are now my “Go-To-Guys” for all projects.
The thing that I liked the most about 42Works was their customer interaction chats. They are very comfortable in explaining complex tasks. I have thrown the kitchen sink at them time to time and they have bounced successfully every single time. I am yet to see a crisis which they couldn’t resolve. I fully recommend their services.
Excellent service all round. Took time to understand the requirements of the job – suggested good improvements and then set about providing a first class service. Very responsive, quick turnaround and the end result was exactly what we wanted. Would definitely use again and thoroughly recommend to anyone else.
I have had the pleasure of working with 42works team on a number of projects over a variety of different platforms and solutions. At every turn, 42works has provided outstanding and responsive technical solutions and often a more elegant result than was originally anticipated. I would highly recommend them for your projects.
Very fast, quick replies, good communication. This job required a lot of small details and they always came through with a solution. I hope to work with 42Works for the long term.
Said it a dozen times already — A team of truly dedicated, motivated, and great coder. Moreover, their designers have a strong understanding of the importance of quality assurance.
This was a challenging job for a challenging client and 42works came through with flying colors. They were able to resolve a few issues that my other programmers struggled mightily with and I would hire them again in a heart beat.
I have worked with 42Works on several of my projects and they have always delivered work on time with 100% top notch quality. I am intact working on a project now, 42Works is my go to guys for any website related projects.
The best thing about the Anmol & 42 works team is that they know what I want and need before I even do. I am astonished at how smart, professional and easily available their services are. Had I known them about 5 years ago I’d have saved a lot of wasted efforts on projects. No one is like Anmol. In a world of imitators he is the real deal!
The thing that I liked the most about 42works was their customer interaction chats. They are very comfortable in explaining complex tasks. I have thrown the kitchen sink at them time to time and they have bounced successfully every single time. I am yet to see a crisis which they couldn’t resolve. I fully recommend their services.