How to resolve display image orientation issue in android device ?
For this issue I use sdcard image url and check the orientation of that image if orientation if not proper then set proper orientation and generate that correct orientation bitmap and Set to the ImageView. I use Below Code for
How to Perform the click on Android device hardware button ?
For the below code we can perform the click on Device Hardware Button : For this action I use ” On Key Event ” : @Override public boolean onKeyDown(int keyCode, KeyEvent event) { super.onKeyDown(keyCode, event); switch (keyCode) { case KeyEvent.KEYCODE_MENU:
How to scan QRcode / barcode Scanner using ZBar Library In Android app?
First Download Zbar Jar file and put on libs folder: zbar.jar file download CameraPreviewForScan.class file CameraPreviewForScan main_activity.xml <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” android:id=”@+id/LinearLayoutpicturedetail” android:layout_width=”fill_parent” android:layout_height=”match_parent” android:orientation=”vertical” > <LinearLayout android:id=”@+id/scan_layout” android:layout_width=”match_parent” android:layout_height=”wrap_content” android:orientation=”horizontal” > <FrameLayout android:id=”@+id/cameraPreview” android:layout_width=”match_parent” android:layout_height=”match_parent”/> </LinearLayout>
How to create specific log file in android?
I am planning to automate the testing of an application by creating a log to store some results of execution of the app . MainActivity.java @ReportsCrashes(formKey=”google doc key”) public class MainActivity extends Activity{ @Override protected void onCreate(Bundle savedInstanceState)
How to Play a Video from url in Android ?
Play a video from Url : Xml : video.xml <RelativeLayout android:layout_width=”match_parent” android:layout_height=”match_parent” android:background=”#FFFFFF” > <VideoView android:id=”@+id/videoView” style=”@android:style/Theme.Holo.Light” android:layout_width=”match_parent” android:layout_height=”match_parent” android:layout_gravity=”center” /> </RelativeLayout> Below I enter the java file use for play live video with streaming . video.java : videoplay