Accessing Images in Android External Storage


To access the list of media files (such as Audio, Images and Video) from an External Storage device in android, the Media provider can be used. An example of using the Media provider to access all Image type files on the External Storage: Cursor mCursor = getContentResolver() .query( MediaStore.Images.Media....

Read More


Starting new Activity in Android


From an Activity To start a new Activity from another Activity: Intent intent = new Intent(this, OtherActivity.class); startActivity(intent); From a Service Intent intent = new Intent(this, OtherActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); (adsbygoogle = window.adsbygoogle || []).push({}); From somewhere else To start an Activity...

Read More


Enabling remote JMX on Glassfish 2.1.1


The default glassfish app. server installation comes with local JMX connections enabled by default. To enable JMX connections from remote hosts all that's needed is to add -Djava.rmi.server.hostname=<hostname> in the JVM Options of the instance of GlassFish, where <hostname> is the external...

Read More


JPA 2 Tutorial - Relationships - One To Many


Following from the previous tutorial we now dive into move interesting and complex parts of JPA 2: Relationships! In this tutorial we'll be focusing on One-to-Many relationships (mainly Bidirectional), looking into their particularities (specially related to the Cascading of operations), we'll create a JUnit Test class for testing the Relationship,...

Read More