Posts

Showing posts from February, 2018

Linux Commands

1. sudo This SuperUserDo is the most important command Linux newbies will use. Every single command that needs root's permission, need this sudo command. You can use sudo before each command that requires root permissions - $ sudo su 2. ls (list) Just like the other, you often want to see anything in your directory. With list command, the terminal will show you all the files and folders of the directory that you're working in. Let's say I'm in the /home folder and I want to see the directories & files in /home. /home$ ls ls in /home returns the following - imad lost+found 3. cd ​Changing directory (cd) is the main command that always be in use in terminal. It's one of the most Linux basic commands. Using this is easy. Just type the name of the folder you want to go in from your current directory. If you want to go up just do it by giving double dots (..) as the parameter. ​ Let's say I'm in /home directory and I want to move in usr directory which is al

Resource not found exception in Roboeletric

Image

How to open the camera in android and handle it's run time permissions

public class BarcodeCaptureFragment extends BaseStackFragment implements BarcodeGraphicTracker.BarcodeUpdateListener, View.OnClickListener, CustomDialogFragment.IDialogEventListener { public static final String TAG = BarcodeCaptureFragment. class .getName(); // intent request code to handle updating play services if needed. private static final int RC_HANDLE_GMS = 9001 ; // permission request codes need to be < 256 private static final int RC_HANDLE_CAMERA_PERM = 2 ; // constants used to pass extra data in the intent public static final String AutoFocus = "AutoFocus" ; public static final String UseFlash = "UseFlash" ; public static final String BarcodeObject = "Barcode" ; private CameraSource mCameraSource ; private CameraSourcePreview mPreview ; //private GraphicOverlay<BarcodeGraphic> mGraphicOverlay; private RelativeLayout rlGiveYourBarCodeNumber ; private CameraSourcePreview previe