Posts

Debugging Android Apps via Wifi(Android 11+)

Image
 Hi friends,  Earlier, I have explained the procedure to connect device so that debugging over WiFi is done. Please  click here if you didn't read it.  Android 11 and higher support deploying and debugging android app wirelessly from your dev machine using Android Debug Bridge (adb). This eliminates the need to deal with common USB connection issues, such as driver installation & lots of wire near the dev machine. Before you begin using wireless debugging, you must complete the following steps: Ensure that your dev machine and device are connected to the same wireless network. Ensure that your device is running Android 11 or higher. Ensure that you have Android Studio Bumblebee(2021.1.1.21) or higher. On your dev machine, update to the latest version of the SDK Platform-Tools.     To use wireless debugging, you must pair your device to your dev machine using a QR Code or a pairing code. Your dev machine and device must be connected to the same wir...

Sensors Off - Disable All Sensors of your android phone

Image
To protect our privacy, some of us put our phone in Flight mode, so that most of the sensors will be put off & our device is a little bit safe. But, In this case, devices can still access some sensors to enable specific functionality, such as screen rotation and taking pictures.  To disable all sensors defined in 'SensorManager' class, you'll have to enable 'Sensor Off' option in your phone. When a user enables Sensors off in developer options (Settings > System > Developer options > Quick settings developer tiles), a new tile appears in the quick settings tray. They can use the tile to prevent apps from accessing the camera, microphone, and all sensors managed by the SensorManager class. **Below is the pictorial representation from a Samsung phone. Note: Calling will not be affected, as it is not using AudioPolicyService, but directly using the microphone. Refer these links for more information:  Sensors-Off Hardware/Sensor

How to Remove Password from Excel Spreadsheet (Unprotect Excel)

One of the ways to unprotect Excel or remove password from Excel spreadsheet is using extensions, for that you should follow below steps: Go to Control panel Click on Folder Options Open View Tab Uncheck “Hide Extension for the known file type” Select the excel file Change the extension of your Excel file from .xlsx to .zip Open Zip File & Extract Open XML File & Delete  Excel v. 2007-10 “sheetProtection password=… />” v. 2013 – “sheetProtection algorithmName=…/>” Save & Close Xml File Save Zip File & Run File **Note: Please note that this is the worksheet password and not the workbook password.

Privacy Policy for AndroStockpile

At AndroStockpile accessible from https://androstockpile.blogspot.com/ , one of our main priorities is the privacy of our visitors/app-users. This Privacy Policy document contains types of information that is collected and recorded by https://androstockpile.blogspot.com/ and how we use it. If you have additional questions or require more information about our Privacy Policy, do not hesitate to contact us. This Privacy Policy applies only to our online activities and is valid for visitors to our website/app with regards to the information that they shared and/or collect in https://androstockpile.blogspot.com/. This policy is not applicable to any information collected offline or via channels other than this website. Our Privacy Policy was created with the help of the  Free Privacy Policy Generator CCPA Privacy Rights (Do Not Sell My Personal Information) Under the CCPA, among other rights, California consumers have the right to:      Request that a business that coll...

Connect ADB via WiFi

Hey Friends,      Many times there are chances that you want less cable over your desk or may be length of your data cable is shorter than expected. In this case, many developers have to struggle in compiling & testing Android Apps. I am showing you a simple way to connect your Android Testing Device once to your system & then you can run/debug your code wirelessly. Steps to follow: 1. You need to connect your device to your computer via USB cable. Make sure USB debugging is working. You can check if it shows up when running adb devices . 2. Run adb tcpip 5555 Here 5555 is port number that you want to use for connection. 3. Disconnect your device (remove the USB cable). 4. Go to the Settings -> About phone -> Status to view the IP address of your phone. I generally use IPv4 for connection. 5. Run adb connect <IP address of your device>:5555 6. If you run adb devices again, you should see your device. Now you can use device...

Location Permission in Android 10

As Android 10 has introduced, the dialog UI as well as handling the location permission has updated. Now, the user has right to allow/disallow that the app can fetch location while it is in background. To accomplish this, a new permission has to be declared in the manifest file: android.permission.ACCESS_BACKGROUND_LOCATION Calling this would pop up a dialog with basically three options: Always Allow Allow only while using the app Deny Along with these options, there are some other scenarios i.e. On selecting Deny will give a new option Deny & Do not ask again Or, if user selects ' Allow only while using the app ', the next time the app is launched, it will only ask the user to allow the Location Permission or deny . User can choose this option to optimize the battery consumption as some of the apps use location updates even when the app is in background or service might be running even if the appis killed. Lets take a simple example of a share cab ap...

Sticky Notes for Ubuntu

Hey Friends!!! Many users who switches from Windows machine to Ubuntu machine misses a very common windows utility tool "Sticky Notes". But, Hey!! don't feel sad, Ubuntu too have a similar application like "Windows Sticky Notes" termed as "Inidicator sticky notes". Here is the steps to install it via terminal: $ sudo add-apt-repository ppa:umang/indicator-stickynotes $ sudo apt-get update $ sudo apt-get install indicator-stickynotes To get more information about indicaot stikynotes, visit https://launchpad.net/indicator-stickynotes Have Fun!!!

Iterating a HashMap

We know that, Java HashMap class implements the map interface by using a hashtable. It inherits AbstractMap class and implements Map interface. The important points about Java HashMap class are: A HashMap contains values based on the key. It contains only unique elements. It may have one null key and multiple null values. It maintains no order. Many times we have to iterate hash map for key or value or both key&value. Here is code block to iterate for the same... If you're only interested in the keys, you can iterate through the keySet() of the map:   Map < String , Object > map = ...; for ( String key : map . keySet ()) { // ... } If you only need the values, use values() : for ( Object value : map . values ()) { // ... } Finally, if you want both the key and value, use entrySet() : for ( Map . Entry < String , Object > entry : map . entrySet ()) { String key = entry . getKey (); Object value ...

How to Disable auto-opening nautilus window after auto-mount in Ubuntu

Hi Friends, As a new user on Ubuntu Machine, many users might have faced the same problem of opening a new window when we add a new usb device, whether it be a usb-stick, portable hdd or mobile phones. This might seem very irritating if you are a developer. For a normal user, its just helping then to directly work on the recently connect usb device but while developing there are times when we connect/reconnect our testing device very frequently. To turn it OFF/ON we have to just write a simple command on Ubuntu terminal. To turn it OFF gsettings set org.gnome.desktop.media-handling automount-open false TO turn it ON gsettings set org.gnome.desktop.media-handling automount-open true To know more about gsetting: $man gsettings To get help about any gsettings commands $gsetting help <COMMAND> ex. $gsetting help Monitor Have Fun!!!

Android Library to Debug Database

Have you ever stucked becaused of not knowing the complete database schema? Did you ever got any confusion related to tables & fields in your db? Try "Android Debug Database" library for debugging your Databases & Shared Preferences. Get more details on github.  [Github-Link] Happy Coding!!!