![]() Just check it while before using this code snippet. Some devices may have /mnt/sdcard may be it is for internal sd cards. The building mode captures the Cardinal and InterCardinal directions such as North Elevation, South East Elevation etc. You can take photos with compass reading showing the direction you’re looking at or switch to building mode to capture the elevation of a building face. I am adding time stamp at top left corner of image, you can change it to anywhere on the image.įor my device the path is /sdcard to access external SD card, it may vary for other devices. Solocator is a camera app with built-in compass features. You have to use below permission in manifest file. String dateTime = sdf.format(Calendar.getInstance().getTime()) // reading local time in the systemĬs.drawText(dateTime, 20f, height+15f, tPaint) ĭest.compress(, 100, new FileOutputStream(new File("/sdcard/timeStampedImage.jpg"))) ![]() SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") Bitmap src = codeResource(getResources(), R.drawable.cuty) // the original file is cuty.jpg i added in resourcesīitmap dest = Bitmap.createBitmap(src.getWidth(), src.getHeight(), _8888) Use below code to achieve what you required.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |