[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Android Studio

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 5
Thread images: 1

File: studio-logo.png (38KB, 400x300px) Image search: [Google]
studio-logo.png
38KB, 400x300px
I'm trying to replicate an app that gets some hardware information of a device.
I figured this to get the camera specifications but sometimes it gets the wrong data based on the sensor size (for example, 16Mp when it has to be 13).
Any idea on how to fix this?

public static String getCamera(SogMainActivity act) {
if (camera != null) return camera;
CameraManager manager = (CameraManager) act.getSystemService(Context.CAMERA_SERVICE);
List<String> result = new ArrayList<String>();
try {
String[] cids = manager.getCameraIdList();

for (String cid : cids) {
SizeF sf = manager.getCameraCharacteristics(cid).get(CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE);
String mpSize = (int)(sf.getHeight() * sf.getWidth()) + " MP ";// + sf.getHeight() + " x " + sf.getWidth() ;
result.add(mpSize);
}
} catch (Exception e){
result.add("Error");
}
return TextUtils.join(" + ", result);
}
>>
Bump, anyone?
>>
>>59195518
Maybe that's the true value.
>>
>>59195518
Why aren't you using kotlin? It's better than Java
>>
>>59195689

It is. I found out that big companies use the same sensor for multiple phones and then just crop the sensor to justify the price drop on phones. AKA: a 13Mp camera can usually take pictures up to 16Mp. What I figured is that I can use android.hardware.camera2 and take a snapshot, then use the snapshot size to figure the size of the sensor. The problem is I'm not able to translate it programmatically.

>>59195700

Unfortunately its for a job.
Thread posts: 5
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.