Posts

Showing posts from April, 2020

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