^

Archive - Android-java

Category about Android-java


XML Styling

Creating a Pop-Up Dialog

Dialog XML File: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.... To see full entry click on the link above!

Display a Video Centered (in XML)

<FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" app:layout_constraintTop... To see full entry click on the link above!

Hints

Android 4/5 SSL Fix over Google Play

This may fix this error --- javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x6abff398:Failure in... To see full entry click on the link above!

Check For Permission and Request

This is Example for Internet Permissions Android Manifest XML (for every Permissoin u need one of this fitting block)     <!... To see full entry click on the link above!

Disable Screenshots/Capturing

In Constructor super.onCreate(savedInstanceState); // Disable Screenshots getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, Window... To see full entry click on the link above!

Display PDF in ImageView (Zoomable)

Just a quick setup to render a pdf File. XML Fragment of Image view (somewhere in your layouts xml where you need it)     <R... To see full entry click on the link above!

Dont reload Activitiy while Rotating Device

There is an easy way to avoid that your activity reloads if you change between portrait/landscape view. Define the class in the manifest file as foll... To see full entry click on the link above!

Download Manager Class

Here a simple Download Manager Class. Use like this:   DownloadManager DM = new DownloadManager();   DM.init(....);   DM.exe... To see full entry click on the link above!

Passing Argument to an Intent

Passing the parameter Intent intent= new Intent(mContext,Activity.class); intent.putExtra("test","value")); Get value ... To see full entry click on the link above!

File Operations

Play a Local Video File

Here the code to display a video in a videoView element. VideoView videoview = findViewById(R.id.VIDEOVIEWID); Uri uri = Uri.pars... To see full entry click on the link above!

Read A File from Internal Storage to String

 Simple Code to read a File in Android (FROM INTERNAL STORAGE) to a String String readFile(Context context, String filename) throws IOExce... To see full entry click on the link above!

Write a File to Android Internal Storage from String

Write a File in Android to Internal Storage from String void writeFile(String data, Context context, String filename) throws IOException { O... To see full entry click on the link above!

Theme
11/9
This Website is using Session Cookies for Site Functionality and AWStats.