Android notify users when app version is updated on play store .

1 . First get current play store version. int currentVersion,updateVersion; VersionChecker versionChecker = new VersionChecker(); try { String latestVersion = versionChecker.execute().get(); updateVersion = Integer.parseInt(latestVersion.substring(latestVersion.length()-1)); Toast.makeText(HomeActivity.this, latestVersion.toString(), Toast.LENGTH_SHORT).show(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } PackageManager manager = this.getPackageManager(); PackageInfo info = null; try { info = manager.getPackageInfo(this.getPackageName(), 0); } […]

Swift 3 / 4 get current location with location manager .

Step – 1 :  First define LocationManager . And Current location of CLLocaion .   var manager = CLLocationManager() var currentLocation: CLLocation! Step 2 : In ViewDidController get Current location with location manager . That’s it .   manager.requestWhenInUseAuthorization()                  if (CLLocationManager.authorizationStatus() == CLAuthorizationStatus.authorizedWhenInUse ||       […]

Swift 3 /4 take photo from camera or gallery and show it .

Step One : First create a project and take imageView and a button to capture image . Connect it to ViewController . Step Two : Copy this code and run . hope it will be done . 😀    class ImageCapture: UIViewController , UIImagePickerControllerDelegate,UIPopoverControllerDelegate,UINavigationControllerDelegate{      @IBOutlet var imageViewWeight: UIImageView!      var imagePicker:UIImagePickerController?=UIImagePickerController() override func viewDidLoad() { […]

Laravel 5.5 : include css , js and image for boostrap theme .

Put your assets in the public folder public/css public/images public/fonts public/js And then called it using Laravel   {{ URL::asset(‘js/scrollTo.js’); }} // Generates the path to public directory public/js/scrollTo.js {{ URL::asset(‘css/css.css’); }} // Generates the path to public directory public/css/css.css {{ URL::asset(‘image/one.png’); }} //Generates the path to public directory public/image/one.png or {{ HTML::script(‘js/scrollTo.js’); }} // […]

Script php artisan clear-compiled handling the pre-update-cmd event returned with error code 255

In laravel there may be shown the following error when working with bellow laravel 5.3 projects . Cause composer structure has been changed .   So how to solve it : Its easy way to just replace the code in composer.php (Only bold sections) :   { “name”: “laravel/laravel”, “description”: “The Laravel Framework.”, “keywords”: [“framework”, […]