Android Developers
1.23K subscribers
164 photos
4 videos
57 files
59 links
Here You Can Get Android App Development Tutorials For Free

LinkTree
https://linktr.ee/androiddeveloperspage

For Comments & Feedback
@androiddevstutorialscommentbot

Contact Me
@SE_BIBEL_MEK
Download Telegram
Encrypted Shared Preferences

Encrypted Shared Preferences is a feature in Android that provides a secure way to store sensitive data, such as user credentials or tokens. It uses encryption to keep data safe from unauthorized access.

Key Features:

AES Encryption: It uses AES encryption algorithms to ensure security.

Master Key: The MasterKeys.getOrCreate() method generates a strong encryption key to protect the shared preferences.

Ease of Use: You can use it like normal SharedPreferences, making it simple to implement.

Encrypted Shared Preferences provides an additional layer of security for sensitive information in your app. It helps prevent data leakage even if the device is compromised.

The Difference Between Shared Preferences & Encrypted Shared Preferences

The main difference between Shared Preferences and Encrypted Shared Preferences lies in the security of the data being stored. Here's a breakdown:

1. Data Security

Shared Preferences: Data stored in Shared Preferences is not encrypted by default. It is stored in plain text, which means if an attacker gains access to the device's storage, they can easily read the contents.

Encrypted Shared Preferences: Data is encrypted using AES encryption algorithms before it is stored. It ensures that even if someone gains access to the storage, they cannot read the data without the encryption key.

2. Use Cases

Shared Preferences: Suitable for storing non-sensitive data such as app settings, user preferences (e.g., theme mode), and other data that does not pose a security risk if exposed.

Encrypted Shared Preferences: Recommended for storing sensitive information such as user credentials, tokens, or any private data that requires a higher level of security.
Encrypted Shared Preference Sketchware Pro Project
Android Developers pinned «Encrypted Shared Preference Sketchware Pro Project»
Android Developers YouTube Channel.
Language Identification Android Project
👍1
💯2👍1
OpenCV

OpenCV (Open Source Computer Vision Library) is an open-source computer vision and machine learning software library. It contains a comprehensive set of tools and functions for real-time image processing, computer vision tasks, and machine learning applications. Here are some key features of OpenCV:

1. Image Processing: It provides a wide range of functions for image manipulation, including filtering, transformation, and color space conversion.

2. Computer Vision: OpenCV supports various computer vision tasks, such as face detection, object recognition, and motion tracking.

3. Machine Learning: The library includes algorithms for classification, regression, and clustering, making it useful for building machine learning models.

4. Cross-Platform: OpenCV is compatible with multiple operating systems, including Windows, macOS, and Linux, and can be used with programming languages like Python, C++, and Java.

5. Real-Time Performance: It is optimized for real-time applications, allowing for fast processing of images and video streams.

6. Extensive Community Support: Being an open-source project, OpenCV has a large community of developers and users, which means a wealth of tutorials, documentation, and forums are available for support.

OpenCV is widely used in various fields, including robotics, augmented reality, medical imaging, and more.
🔥1
I'm Thinking About Creating A Tutorial About OpenCV Android SDK In Sketchware Pro. But Before I Start I Want To Be Sure How Many Of You Want This Tutorial.
🥰1
Do You Want OpenCV Android SDK Tutorial In Sketchware Pro
Final Results
95%
Yes
5%
No
How To Read & Display An Image File Using OpenCV

To Read & Display An Image File Using OpenCV We Can Use Mat Object.

In OpenCV, a Mat (Matrix) object is the primary data structure used to store and manipulate image data. It represents an n-dimensional array, typically used for 2D images, where each element contains pixel data (e.g., RGB or grayscale values).

To Load & Display An Image Using OpenCV Follow The Following Steps.

Step1. In The View Area Add ImageView Or Any Other Image Displaying View.

Step2. Make Sure You Select OpenCV Android SDK In The Library Manager.

Step3. In The Custom Imports Add The Following Classes From OpenCV.

import org.opencv.core.Mat; 
import org.opencv.android.Utils;
import org.opencv.imgproc.Imgproc;
import org.opencv.imgcodecs.Imgcodecs;

Step4. Load OpenCV C++ Binary Using The Following Code.

} 
static {
System.loadLibrary("opencv_java4");
}
{

Step5. In Any Event You Want(OnCreate, OnButton Click Or Any Other Event) Where You Want To Load & Display The Image Use This Code. Read Comment's For Better Understanding.

//Set The Image File Path

String ImageFilePath = "/sdcard/image_file.png";

//Read The Image File From The Specified Path In ImageFilePath String Variable & Store It In OpenCV Mat(Matrix) Object.

Mat mat = Imgcodecs.imread(ImageFilePath);

//By Default OpenCV Uses BGR(Blue, Green, Red) Color Format For The Image & As You Know Android Uses RGB(Red, Green, Blue) Color Format. So It Causes The Image To Have Unusual Color So We Need To Convert Them From BGR(Blue, Green, Red) Color Format To RGB(Red, Green, Blue) Color Format Using This Method.

Imgproc.cvtColor(mat, mat, Imgproc.COLOR_BGR2RGB);

//Create Bitmap From The Mat Object Columns & Rows.

Bitmap bitmap = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);

//Convert The Image From OpenCV Matrix Object To Android Bitmap.

Utils.matToBitmap(mat, bitmap);

//Display The Bitmap In ImageView Called imageview1
imageview1.setImageBitmap(bitmap);
}
👍1😁1