Posts

How To Create First NodeJS Application In Android

Image
NodeJS  Is A Runtime Environment That Allows You To Run JavaScript Code On The Server-Side. It Uses The V8 JavaScript Engine, Developed By Google For Chrome Browser, To Execute JavaScript Code Outside Of A Web Browser. NodeJS Is Commonly Used For Building Scalable Network Applications , Such As Web Servers , APIs , And Real-Time Applications , Due To Its Event-Driven, Non-Blocking I/O Model, Which Makes It Efficient And Lightweight. NodeJS Is A Cross Platform JavaScript Runtime Environment Which Supported On Every Operating Systems Include Windows , macOS  &  Linux . It Can Also Be Installed In Android OS Using Termux. In This Tutorial We Will Learn How To Install & Use NodeJS In Android. 1. Install Termux Termux Is An Android Terminal Emulator And Linux Environment App That Allows Users To Run Various Linux Command-Line Utilities Directly On Their Android Devices. It Provides A Full-Fledged Linux Environment, Including Packages And Tools Such As Bash, Ssh, Git, And

How To Create PDF Reader App In Android

Image
PDF stands for Portable Document Format. It's a file format developed by Adobe that preserves a document's layout , fonts , and images , making it independent of the software, hardware, and operating system used to view or print it. PDFs are commonly used for sharing documents across different platforms while maintaining consistent formatting. In Android Framework There Is A Built-in Class Called PdfRenderer Which Allow Us To Read PDF Files Introduced In Android 5.0 (API level 21). But For Older Versions Of Android We Don't Have Any Solutions So We Will Use External Libraries To Achieve This. On Of The Library Is Called Barteksc PDF Viewer . In This Tutorial We Will Cover On How We Can Read PDF Files From Asset Folder Using This Library. Step1.  Create Or Open An Existing Android Project. Step2.  Add The Following Library Dependency In Your app-level build.gradle File. implementation 'com.github.barteksc:android-pdf-viewer:2.8.2' Step3. After Downloadi

How To Check If The Device Has Lock Screen Setup In Android

Image
Smart Phones Have Been Enhancing Their User Privacy Over Years To Now. Starting From PIN (Personal Identification Number) To Fingerprint & Face Recognition. This Will Give The User Freedom Over Their Android Device. As An Android App Developer You Might Be Wondering How You Can Check If The Android Device Has Been Secured By  PIN(Personal Identification Number),   Pattern , Fingerprint  ,  Face Recognition Or Any Other Security Feature Supported By The Android Device. For This Purpose Their Is An Android Built-in Class Called KeyguardManager . This Class Hold Methods Related To The Security Of The Android Device. In This Tutorial We Will Cover On How We Can Check If The Device Has Any Security Setup. Step1 . Create Or Open An Existing Android Project. Step2. In Your Project MainActivity.java Or Any Activity You Want To Check Security Setup Add The Following Import Statements. import android.content.Context; import android.app.KeyguardManager; Step3. After That Define T

How To Get All Files Access Permission In Android11

Image
Android11 Introduced A New Storage Access Permission Called All Files Access. This Permission Will Give Us Access To Any Content Inside The USB Storage Of The Android Device Except The Android/obb & Android/data Directory. In This Tutorial We Will Learn How To Add This Permission To Our Project. Step1 . Create Or Open An Existing Android Project. Step2 . Open Your Project Android Manifest File & Add MANAGE_EXTERNAL_STORAGE  Permission. <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/> Step3 . If You Want To Check If The User Allowed The Permission Or Not At Runtime You Can Use Environment isExternalStorageManager  Boolean Method. if(Environment.isExternalStorageManager()){   //Permission Allowed } else {   //Permission Not Allowed } Step4 . Also If You Want To Redirect The User To The Permission Authorization Page You Can Use    android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION   Intent Flag. Intent intent = new

Color Picker In Sketchware Pro

Image
To Create A Color Picker In Sketchware Pro Follow These Steps. Step1 . Create New Project In Sketchware Step2 . Design The View As You Want. On My Side I Have Added A TextView For Displaying The Picked Color & A  Button For Showing The Color Picker With Text Pick Color. Step3.  For Creating The Color Picker We Will Use mrudultora Color Picker Library. So Go To Sketchware Local Library Manager & Enter The Following Library Dependency (You Can Use Either DX Or D8 To Dex The Library). com.github.mrudultora:Colorpicker:1.2.0 Step4. After Downloading The Library Go To The Event In Which You Want To Show The Color Picker. Here I Will Show The Color Picker When The Button Is Clicked Then Use The Following Codes(Read The Code Comments For Better Understanding). //First We Will Instanstiate The Color Picker Popup Object. You Need To Pass  Context As A Parameter. ColorPickerPopUp colorpickerpopup = new ColorPickerPopUp(MainActivity.this