Here i share my Android , React-Native , Kotlin coding knowledge for Android Beginner, Android Users, Android Developer. Kotlin android learners, React-Native learners. Also Support for Application developers with code suff to create applications.
Sunday, 22 December 2019
Merry Christmas Wishes Application
Monday, 18 November 2019
Privacy Policy
Privacy Policy
AuroInfoSoft built the Merry Christmas app as a Free app. This SERVICE is provided by AuroInfoSoft at no cost and is intended for use as is.
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Merry Christmas unless otherwise defined in this Privacy Policy.
Information Collection and Use
For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.
The app does use third party services that may collect information used to identify you.
Link to privacy policy of third party service providers used by the app
Log Data
I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
Cookies
Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.
This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
Service Providers
I may employ third-party companies and individuals due to the following reasons:
- To facilitate our Service;
- To provide the Service on our behalf;
- To perform Service-related services; or
- To assist us in analyzing how our Service is used.
I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.
Security
I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.
Links to Other Sites
This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.
Children’s Privacy
These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.
Changes to This Privacy Policy
I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
Contact Us
If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at divyataptel27988@gmail.com.
This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator
Saturday, 21 September 2019
Android LiveData
- Lets see how it will help full for Developing Application.
- LiveData usefull for observable Data Class which holds all the Data.
- You can create singleton object of LiveData and can share that common Data between Activity, Fragments , Services.
Life-cycle of Data with
Start and Resume.
- LiveData notifies when any Update happen in Data under Observe method.
- So now to bind view controls with LiveData objects , no need to worried about do any other update operation to get updated value bind with Ui.
- All Views related to bind with LiveData objects will automatically get up to date with updated values.
Advantage Of LiveData in Application.
- All Time up to Date Data with all view-Controls.
- Automatically clean up there Data, so no Memory-Leak issue more.
- when Activity press back then LiveData goes inActive state. So Its avoid to crash Application.
- Its can use with ViewModel, Room etc where you require to use it in proper way.
Monday, 9 September 2019
Android Data Binding Updates
Here how we can implement Data Binding in Android its given.
-> This Library allows bind Layouts components with data in xml declaration instead of bind data and ui controls programmatically.
-> Example use the Data Binding to assign textView in Xml layout.
-> No need to call other Java code
-> use this syntax @{} in assignment of control
Like
<TextView
android:text="@{pojomodel.userName}" />
do in build.gradle file
android {
...
dataBinding { enabled = true}
}-> in Details under stand like below
-> Create Pojo class.
package com.t.databinding; public class Pojomodel { private String mid; private String strname; public String getMid() { return mid; } public void setMid(String mid) { this.mid = mid; } public Pojomodel(String id, String name) { this.mid = id; this.strname = name; } public String getName() { return strname; } public void setName(String name) { this.strname = name; } }-> Create Layout file like
<?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"><!--Step 1-->
<data><!--Step 2-->
<variablename="Pojomodel"type="com.t.databinding.Pojomodel" /></data>
<LinearLayout
android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"android:padding="16dp"tools:context="com.androidbytes.databindingdemo.MainActivity"><!--Step 3-->
<TextViewandroid:id="@+id/text_id"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@{Pojomodel.mid}"android:textColor="@android:color/black"android:textSize="26sp" /><TextView
android:id="@+id/text_view_name"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@{Pojomodel.name}"android:textColor="@android:color/black"android:textSize="18sp" /></LinearLayout>
</layout>
-> Create MainActivity
package com.t.databinding; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.DataBindingUtil; import android.os.Bundle; import com.t.databinding.databinding.ActivityMainBinding; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // After Data BindingActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main); Pojomodel personVO = new Pojomodel("#1","Abc "); binding.setPojomodel(personVO); } }-> Data Binding Use in Application improve app performance , handle null pointer exception,
prevent from memory leak
-> Thanks this detail will help full to you for understand about Data Binding usage in Android Application.
Saturday, 7 September 2019
About WorkManager
§ To perform single and multiple task with enqueue process manage using Work Requests
§ Now Work Manager with Android Architecture Component and Its comes with Android Jetpack to handle like background work thread, and its guaranteed to execute to take care of perform Logic within it. It will do your background task as it can.
When need to be use Work Manager
- Applying filtration to images and save image
- On Particular Interval time syncing local data with the network Data
- Uploading Logs, Data
What you will need to handle in Work Manager library
- Worker -> You need to get subclass, to perform the task, that will run in the background.
- Work Request -> Its represents the request of the task that will run. Need to set the task through the Worker subclass. Also You can specify constraints Like, only run the task if the device has Internet connectivity. There are two main types of work requests:
- One Time Work Request -> which can be executes the task just one time,
- Periodic Work Request -> which can be executes your task periodically.
- Work Status -> Whenever you want to know the status of your
What you will learn from
Work Manager library
- Passing data Input and output
parameters
- Multiple works request Chaining
work
- Unique work
- Displaying work status in the
UI
- Adding Work Manager into your
project
- Scheduling a simple Single task
execution
- Cancelling work by Id
Saturday, 27 July 2019
How to make window full screen in android
@Overrideprotected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);
Done , above one line code in bold font we have to declare for window full screen.
Wednesday, 10 July 2019
Android VideoView with Multimedia controls
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_marginTop="@dimen/d_10dp"
android:layout_marginBottom="@dimen/d_10dp"> <VideoView
android:id="@+id/videoview"
android:layout_width="match_parent"
android:layout_height="200dp" /> </RelativeLayout>
Now add below code in MainActivity.java
define your variable first
VideoView videoView;
MediaController mediaControls;
in onCreateView method add below code
videoView = (VideoView)view.findViewById(R.id.videoview);add below code where you want to play video
String FullVideopath = "Here is your video path";
videoView.setVideoPath(FullVideopath);mediaControls = new MediaController(mcontext); mediaControls.setAnchorView(videoView);videoView.setMediaController(mediaControls);videoView.start();
videoView.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { mp.setOnVideoSizeChangedListener(new MediaPlayer.OnVideoSizeChangedListener() { @Override public void onVideoSizeChanged(MediaPlayer mp, int width, int height) { videoView.setMediaController(mediaControls); mediaControls.setAnchorView(videoView); } }); } });viewvideoView.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { Toast.makeText(mcontext, "Video over...!!!", Toast.LENGTH_LONG).show();} }); videoView.setOnErrorListener(new MediaPlayer.OnErrorListener() { @Override public boolean onError(MediaPlayer mp, int what, int extra) { Toast.makeText(mcontext, "Oops An Error Occur While Playing Video...!!!",Toast.LENGTH_LONG).show();
return false; } });}
Wednesday, 3 July 2019
Android Json response parsing method with Gson
here you need to get your Json response in your String variable before start parsing it.
do this process in Your Class
String result = "Your Json Resonse" ; List<MUsers> mUsers = null; try { Gson gson = new Gson(); Type type = new TypeToken<List<MUsers>>(){}.getType(); mUsers = gson.fromJson(result, type); } catch (JsonSyntaxException e) { e.printStackTrace(); }
Here in Your MUsers Class need to contain all require keys to parse it based on your Json response contains no of keys . here explaining with single key value parsing class as below it would be like.
public class MUsers{ @SerializedName("USR") @Expose private String usr; public void setUSR(String usern) { this.usr = usern; } public String getUSR() { return usr; } }
Here in your build.gradle file need to add supportive library to parse this data
Friday, 28 June 2019
Android Spinner background customize using xml Selector
create this xml file in res/drawable folder with name spinner_background.xml
do code for it like as below
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<layer-list>
<item>
<shape>
<stroke android:width="1dp" android:color="#dddddd" />
<padding android:bottom="3dp" android:left="3dp" android:right="3dp" android:top="3dp"/>
<solid android:color="#FFFFFF" />
</shape>
</item> <item ><bitmap android:gravity="right|center" android:src="@mipmap/ic_downarrow" /> </item> </layer-list></item> </selector>
here you need to set ic_downarrow image in mipmap folder as per you need design. will look in Spinner
right side this image.
Now in your layout,xml file with Spinner item do set this xml file to display costume spinner background
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<Spinner
android:id="@+id/spnitem"
android:layout_width="200dp"
android:layout_gravity="center_horizontal"
android:layout_height="@dimen/editext_size"
android:overlapAnchor="false"
android:textSize="@dimen/reg_text_size"
android:background="@drawable/spinner_background" />
</LinearLayout>
Thursday, 27 June 2019
Android updated Api features for Camera to Text detection Example
To create Application in Android studio follow below steps
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="yourpackageName">
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="ocr"/> </application> </manifest>
build.gradle
dependencies {
compile 'com.google.android.gms:play-services-vision:11.0.4'}
activity_main.xml
Here we also use Button to share character to other apps.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:weightSum="5"
tools:context="Yourpackage.MainActivity">
<SurfaceView
android:id="@+id/surfaceView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="4" />
<TextView
android:id="@+id/text_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_margin="8dp"
android:layout_weight="1"
android:gravity="center"
android:textStyle="bold"
android:background="@drawable/mboarder"
android:text="@string/txt_message"
android:textColor="@android:color/black"
android:textSize="20sp" />
<Button
android:id="@+id/btnShare"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Share"
android:textAllCaps="false"
android:background="@color/colorAccent"
android:layout_marginBottom="5dp"
android:textColor="@android:color/white"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
MainActivity.java
package your.packageNamehere; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.util.SparseArray; import android.view.SurfaceHolder; import android.view.SurfaceView; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.google.android.gms.vision.CameraSource; import com.google.android.gms.vision.Detector; import com.google.android.gms.vision.text.TextBlock; import com.google.android.gms.vision.text.TextRecognizer; import java.io.IOException; public class MainActivity extends AppCompatActivity { SurfaceView mCameraView; TextView mTextView; CameraSource mCameraSource; private static final String TAG = "MainActivity"; private static final int requestPermissionID = 101; Button btnShare; String ReadString; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mCameraView = findViewById(R.id.surfaceView); mTextView = findViewById(R.id.text_view); btnShare = findViewById(R.id.btnShare); btnShare.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT,ReadString); sendIntent.setType("text/plain"); startActivity(sendIntent); } }); startCameraRead(); } @Overridepublic void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { if (requestCode != requestPermissionID) { Log.d(TAG, "Got permission result" + requestCode); super.onRequestPermissionsResult(requestCode, permissions, grantResults); return; } if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { try { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { return; } mCameraSource.start(mCameraView.getHolder()); } catch (IOException e) { e.printStackTrace(); } } } private void startCameraRead() { final TextRecognizer ReadText = new TextRecognizer.Builder(getApplicationContext()).build();if (!ReadText.isOperational()) { Log.w(TAG, "Detector yet not allow "); } else {mCameraSource = new CameraSource.Builder(getApplicationContext(), ReadText) .setFacing(CameraSource.CAMERA_FACING_BACK) .setRequestedPreviewSize(1280, 1024) .setAutoFocusEnabled(true) .setRequestedFps(2.0f) .build();mCameraView.getHolder().addCallback(new SurfaceHolder.Callback() {@Override public void surfaceCreated(SurfaceHolder holder) { try { if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CAMERA}, requestPermissionID); return; } mCameraSource.start(mCameraView.getHolder()); } catch (IOException e) { e.printStackTrace(); } } @Overridepublic void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { } @Overridepublic void surfaceDestroyed(SurfaceHolder holder) { mCameraSource.stop(); } }); ReadText.setProcessor(new Detector.Processor<TextBlock>() {@Overridepublic void release() { } @Overridepublic void receiveDetections(Detector.Detections<TextBlock> detections) { final SparseArray<TextBlock> items = detections.getDetectedItems(); if (items.size() != 0 ){ mTextView.post(new Runnable() { @Override public void run() { StringBuilder stringBuilder = new StringBuilder(); for(int i=0;i<items.size();i++){ TextBlock item = items.valueAt(i); stringBuilder.append(item.getValue()); stringBuilder.append("\n"); } mTextView.setText(stringBuilder.toString()); ReadString = stringBuilder.toString(); } }); } } }); } } }
Find Hours Diffrence in Kotlin
In Kotlin, determining the difference in hours between two timestamps is a common task, especially in scenarios involving time-based calcu...
-
Auro InfoSoft built the Diwali Dhamaka app as a Free app. This SERVICE is provided by Auro InfoSoft at no cost and is intended for use as ...
-
Auro InfoSoft built the Thanksgiving Day Wallpapers app as a Free app. This SERVICE is provided by Auro InfoSoft at no cost and is intende...
-
Auro InfoSoft built the Visiting Cards Real app as a Free app. This SERVICE is provided by Auro InfoSoft at no cost and is intended for us...