Posts

Showing posts from 2020

How to build your own browser app in android studio

Enter the following codes in Main activty.java package com.my.nebrowser; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; public class MainActivity extends AppCompatActivity { private EditText url; private Button search1;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         url = findViewById(R.id.url);         search1 = findViewById(R.id.searchurl);         search1.setOnClickListener(new View.OnClickListener() {             @Override         ...

how to build a Browser in android studio part 01

Image

Rozary pay payment Gateway implementation on your app.

If you are going to make an live payment app then you have to sing up in Rozary pay and build a live tokon for your app here i am using test tokon for it this are the following codes you have to implement to your app 1. In build.gradle(module.app) implementation 'com.razorpay:checkout:1.5.13' 2.In progroun rules.pro past following codes. -keepclassmembers class * { @android.webkit.JavascriptInterface <methods>; } -keepattributes JavascriptInterface -keepattributes *Annotation* -dontwarn com.razorpay.** -keep class com.razorpay.** { *; } -optimizations !method/inlining/* -keepclasseswithmembers class * { public void onPayment*(...); } 3. In manifest file past this meta data < meta-data android :name ="com.razorpay.ApiKey" android :value ="rzp_test_4xWs1d6clD1zFz" /> 4. Create your xml layout and create a button and a edit text to enter the amount to pay an past the following codes to it final Activity acti...

How to load image view from your android to your android studio app

On click listener for picking button... btnpick .setOnClickListener( new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(Intent. ACTION_PICK ); intent.setType( "image/*" ); // change the image to the file you want. startActivityForResult(intent, Select ); } }); } @Override protected void onActivityResult( int requestCode, int resultCode, @Nullable Intent data) { super .onActivityResult(requestCode, resultCode, data); if (requestCode == Select ) { if (resultCode == RESULT_OK ) { Uri select = data.getData(); InputStream inputStream = null ; try { assert select != null ; inputStream = getContentResolver().openInputStream(select); } catch (Exception e) { e.printStackTrace(); } BitmapF...

How to read all phone contacts in android studio

1.Open manifest file in your android studio and past the below code. < uses-permission android :name ="android.permission.READ_CONTACTS" ></ uses-permission > 2.Open your layout.xml file past the following codes. <? xml version ="1.0" encoding ="utf-8" ?> < ScrollView xmlns: android ="http://schemas.android.com/apk/res/android" xmlns: app ="http://schemas.android.com/apk/res-auto" xmlns: tools ="http://schemas.android.com/tools" android :layout_width ="match_parent" android :layout_height ="match_parent" tools :context =".MainActivity" > < TextView android :layout_width ="wrap_content" android :layout_height ="wrap_content" android :id ="@+id/phone" android :padding ="3dp" /> </ ScrollView > 3. Open your Main activity.java past the following c...

How to update android studio App in play store console

Image