Skip to main content

Home/ Android Dev/ Group items tagged tech

Rss Feed Group items tagged

Vincent Tsao

Supporting Multiple Screens | Android Developers - 0 views

  • The density of a screen is important because, other things being equal, a UI element (such as a button) whose height and width are defined in terms of screen pixels will appear larger on the lower density screen and smaller on the higher density screen.
  • The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, the baseline density assumed by the platform (as described later in this document). At run time, the platform transparently handles any scaling of the dip units needed, based on the actual density of the screen in use. The conversion of dip units to screen pixels is simple: pixels = dips * (density / 160). For example, on 240 dpi screen, 1 dip would equal 1.5 physical pixels. Using dip units to define your application's UI is highly recommended, as a way of ensuring proper display of your UI on different screens.
Vincent Tsao

using Java to get a file's md5 checksum? - Stack Overflow - 0 views

  • java.security.DigestInputStream
  • MessageDigest md = MessageDigest.getInstance("MD5");InputStream is = new FileInputStream("file.txt");try {  is = new DigestInputStream(is, md);  // read stream to EOF as normal...}finally {  is.close();}byte[] digest = md.digest();
Vincent Tsao

Issue 1480 - android - Intent android.media.action.IMAGE_CAPTURE returns an image with ... - 0 views

  • On an HTC Hero, this EXTRA_OUTPUT doesn't even work. It doesn't put your picture in the file you specify, but it hands it to you thru a Mediastore uri. Apparently, the only way to get a full size picture is to do all camera handling in your app instead of using the IMAGE_CAPTURE intent.
  • I think Google have missed a trick on this one. They have defined standard intents for media capture, but not specified standard responses (ie. the "data" parameter in the onActivityResult Activity callback method). Other Android vendors (e.g. HTC Hero) have created their own Camera applications that handle the standard IMAGE_CAPTURE intent, but return different data & have different ways to save/return the image information. All I want is to be able to fire a IMAGE_CAPTURE intent from my own app, and get back a Uri reference to the captured image. Simple. I have no requirement to further manipulate the image .. I just need the Uri to store in my app's database for future reference.
« First ‹ Previous 41 - 60 of 127 Next › Last »
Showing 20 items per page