fabiochiu/medium-articles huggingface dataset:
Analyze Trip Advisor Hotel Reviews: LDA Topic Modeling
By: Chloe Wei
Tags: Python, Naturallanguageprocessing, Data Science, Text Mining, Topic Modeling

What makes a hotel good/bad? What matters to the travelers? Let’s find out.

Hotels play a crucial role in traveling and with the increased access to information, new pathways of selecting the best ones emerged.

With this dataset, consisting of 20k reviews crawled from Trip advisor, I will apply LDA to:

Discover top topics and keywords mentioned in the reviews

Explore the key aspects that make a hotel good or bad

Latent Dirichlet Allocation (LDA)

A Topic Model is a type of statistical model for discovering the abstract “topics” that occur in a collection of documents. Latent Dirichlet Allocation (LDA) is an example of topic model and is used to classify text in a document to a particular topic. It builds a topic per document model and words per topic model, modeled as Dirichlet distributions.

Let’s get started!
I Created My Own Python Algorithm to Find the Right Medium Publication to Submit To
By: Pranjal Saxena
Tags: Naturallanguageprocessing, Python, Strategy, Programming, Algorithms

The Inspiration

After writing an article, the main task is to find a suitable publication and then publish the article in that publication. Most of the time we get refused by the publication because our article is not eligible for their publication. Sometimes we manage to publish to a publication but don’t get many views.

Screenshot by author

This is not the fault of any party. And, even if we follow the guidelines defined by the publication, still we find that the article is not that suitable for publication.

I wrote a script or a program that can find the best suitable publication based on the content of my article or the draft so that I don’t need to waste my time sending my article to the wrong publications.

Here’s how I made it possible.
Beginner Startup as an Android App Developer!
By: Raj Kumar Barmon
Tags: Android App Development, Android Apps, Android, AndroidDev, Beginners Guide

Beginner guide for android app development

Day by day expands more developed app in a play store. First time Google used the primary language (Java) and now they use the Kotlin language.

When beginners want to learn android development they get confused! What path should follow to build a career as an app developer?

Well, first of all, you have to understand the basic programming concept. How programming works and how to think logically and write logical code. The first time you get depressed, but never mind, we all get stuck in beginning but not stop learning programming code. The mindset is very important. You have to prepare your mind you can do it!

What programming language should I learn first for android app development?

Java! Yes, you hear it write. You have to know first java programming language and concept. How java language work. Java is Object-oriented programming (OOP) language. You don’t need to an expert in this language. Complete your basic understanding of java then go for Android app development. This makes it easy to understand writing your code in android studio. “Android Studio” — is an ide. This ide core function builds by Jetbrains and maintains by google.

Your first Android App:

Try to make your first app with simple code and run it in an emulator or your android phone. It makes you inspired in your mind. Finally, build your first app with lazy code! Your first app would be simply listed items or pass data from one activity to another activity. Try to learn more about XML because it makes the app looks nice. You can make a nice UI design from XML in android.

Yes, you learn a few things but you have to learn a lot for more advanced app development.

When I switch or learn Kotlin for Android App Development?

After you the fully confident and had experience with java then you can switch kotlin language. Google announced official support for Kotlin programming language for Android development almost a year ago! The result of the estimations showed that even if Kotlin is a much “better” language than Java, its adoption on projects staffed with experienced Java developers is likely to be counter-productive.

Continue your learning skill and again experience about Android App development career!!

Conclusion:

You have moved step by step, don’t jump forward 4x faster to get desired your goal. Otherwise, you will fail in this sector! Spend time to build your skill and make a great app with your knowledge.
Cara menggunakan Preferences DataStore
By: Ian Christian Adolfian Damping
Tags: Android App Development, AndroidDev, Preferences Android, Indonesia, Sharedpreferences

Always curious and always want to continue learning in many ways
7 Android Studio Shortcuts to speed up every Junior Android productivity
By: Ivan Hurt
Tags: Developer Productivity, AndroidDev, Android Studio

Photo by Marc Mintel on Unsplash

One of the quickest ways to become more productive, Junior Android developer, is to become more productive. One of the easiest ways to become tp increase your productivity is to use keyboard shortcut keys.

As a Junior Android developer, let me share my 7 favorite Android Studio shortcut keys that speed up my workflow.

Navigating between open editor tabs

Instead of using your mouse to navigate between multiple open tabs, try this combination instead:

Alt + Right Arrow or Alt + Left Arrow (Windows)

Control + Right Arrow or Control + Left Arrow (Mac)

Resizing layout with ease

I use these keyboard shortcuts often because I find myself zooming in and out of layout constantly.

Control + plus or Control + minus (Windows)

Command + plus or Command + minus (Mac)

Generating code saver

This keyboard shortcut has saved me many keystrokes from writing getters, setters, constructors, toString, etc. myself. Why generate this code yourself when Android Studio will do it for you?

Alt + Insert (Windows)

Command + N (Mac)

Don’t forget the if else

Throughout your day, you are going to write an if/else or try/catch statement. Use this keyboard shortcut to let Android Studio generate the code for you.

Alt + Insert (Windows)

Command + N (Mac)

Apply those changes and go

You just made a small change and want to run your code. Don’t move your mouse. Do this instead to apply changes and restart an activity.

Control + F10 (Windows)

Control+ Command + R (Mac)

Debug

We all need to debug our code, and this little keyboard combination will make starting the process so much easier.

Shift + F9 (Windows)

Control + D (Mac)

Commit those changes

What type of Android developer would I be if I didn’t include a version control shortcut? Use these to commit those changes.

Control + K (Windows)

Command + K (Mac)

I hope my list of 7 Android Studio Keyboard Shortcuts helps any Junior Android Developer speed up their productivity. I know these shortcuts have saved plenty of keystrokes, and I hope they will help you too.
How to set click even on Popup Menu in Android Kotlin.
By: Arman Ansari
Tags: Android App Development, Android, AndroidDev, Software Development, Kotlin

First of all, We will create an XML file in this. We will use TextView and Button in the XML file. We will use setOnMenuItemClickListener{} in MainActivity.

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>

<LinearLayout

xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"

xmlns:app="http://schemas.android.com/apk/res-auto"

android:layout_width="match_parent"

android:layout_height="match_parent"

android:orientation="vertical"

android:gravity="center"

tools:context=".MainActivity">



<TextView

android:id="@+id/textView"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Choose Item"

android:textStyle="bold"

android:textSize="25sp"/>



<Button

android:id="@+id/popup_menu"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:text="Click Popup"

android:layout_marginTop="10dp"

android:textAllCaps="false"/>



</LinearLayout>

MainActivity.kt

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_main)



val buttonPopup_menu = findViewById<Button>(R.id.popup_menu)

val textView = findViewById<TextView>(R.id.textView)



val showPopUp = PopupMenu(

this,

buttonPopup_menu

)



showPopUp.menu.add(Menu.NONE, 0, 0, "Item 0")

showPopUp.menu.add(Menu.NONE, 1, 1, "Item 1")

showPopUp.menu.add(Menu.NONE, 2, 2, "Item 2")

showPopUp.menu.add(Menu.NONE, 3, 3, "Item 3")



showPopUp.setOnMenuItemClickListener { menuItem ->

val id = menuItem.itemId

if (id==0){

textView.text = "Item 0"

}

else if(id==1){

textView.text = "Item 1"

}

else if (id==2){

textView.text = "Item 2"

}

else if (id==3){

textView.text = "Item 3"

}

false

}

buttonPopup_menu.setOnClickListener {

showPopUp.show()

}

}

}

For result: -

First of all, We will see the runtime as this.
Pull-Down-To-Refresh The Screen In Flutter
By: Akshay Papneja
Tags: Flutter, Refresh, AndroidDev, Andorid, Dart

What’s up coders…

Whenever we want to refresh the screen while writing apps, either we click on side menu of dashboard, or we implement a button to refresh our screen to fetch new data available.

But, does this really make any sense??

Nope, we can implement pull down to refresh the screen of our screen if there is new data available or any change in data. It boost our app performance as well as UI improvement.

For this kind of functionality, a package is available which provider a smart refresher to pull down to refresh the screen.

So. Let’s implement this package. First add this to your pubspec.yaml file.

pubspec.yaml

pull_to_refresh: ^1.6.3

get dependency

flutter pub get

import package

import 'package:pull_to_refresh/pull_to_refresh.dart';

Let’s initialize the controller to make our refresh completed.

RefreshController _refreshController =

RefreshController(initialRefresh: false);

Your child must be a list view . Now apply the smart refresher to the body of our scaffold using the code snippet below.

return Scaffold(

body: SmartRefresher(

enablePullDown: true,

controller: _refreshController,

onRefresh: _onRefresh,

onLoading: _onLoading,

child: ListView.builder(

itemBuilder: (c, i) =>Card(Center(child:Text(items[i]))),

itemCount: items.length,

),

),

);

For initial data,

void _onLoading() async {

// your api here

_refreshController.loadComplete();

}

For refresh of data while pull to refresh,

void _onRefresh() async {

// your api here

_refreshController.refreshCompleted();

}

That’s all, you can see the code to refresh the screen with a better approach, it almost fit for all scrollable widgets like GridView, ListView etc. I guess this snippet is important for better productivity of our app.

For reference go to the link here.

If you like this article, just give me a clap.

Happy Coding !
This is pretty awesome!
By: Douglas Collar Da Cunha
Tags: Android App Development, Android, AndroidDev, Football, Soccer

Living and learning, not always on the easy way.
Android Apps Development course in Rawalpindi Pakistan
By: Icp Institute
Tags: Android App Development, Android, AndroidDev, Freelancing, Freelancers

Android Applications Development Course in Rawalpindi, Islamabad. Best Computer Institute

Apply Online More Courses.... Mobile App technology now a days increase day by day and the common operation system is…
Flutter : Download File/Image From URL In Flutter
By: Akshay Papneja
Tags: Android App Development, Flutter, Flutter Widget, Android, AndroidDev

Hello all,

Here is the shortcut to download image file from URL. For all those lazy programmers. A Flutter package makes this task simple.

Start

pubspec.yaml

image_downloader: ^0.20.1

get dependencies using,

flutter pub get

import

import 'package:image_downloader/image_downloader.dart';

Add this permission in AndroidManifest.xml

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

User this code below, where you want to download image from server.

try {

var imageId = await ImageDownloader.downloadImage(url);

if (imageId == null) {

return;

}

var path = await ImageDownloader.findPath(imageId);

} on PlatformException catch (error) {

print(error);

}

You can also set your custom path where you wanna store that file

await ImageDownloader.downloadImage(url, destination: AndroidDestinationType.custom(directory:'sample'));

Here you all set to download the file from the server URL, you can define you path where you want to store that file, usually downloading file from server is a common task in the era of app development. So, go grab it.

Thanks me later

For reference click on the link here.

If you like this article, just give me a clap.

Happy Coding !
Let’s Add Products in Android for E-Commerce App
By: Nil Madhab
Tags: Ecommerce Web Development, Android, Technology Hits, AndroidDev, Mobile App Development

Dependencies

To build our application successfully, we need the following dependencies

Recycler View

Card View

Retrofit

Gson converter

Glide

Copy-paste the dependencies given in the below blocks in the app level gradle file and click sync now on the top right corner of the IDE to get all the dependencies.

Recycler View makes it easy to efficiently display large sets of data. We supply the data and define how each item looks, and the Recycler View library dynamically creates the elements when they’re needed. As the name implies, Recycler View recycles those individual elements.

implementation ‘androidx.recyclerview:recyclerview:1.1.0’

Card View is gonna act as the basic building block element for our Recycler View. The Card View contents will be decided by us and the same block of elements will be repeating in our Recycler View.

implementation 'androidx.cardview:cardview:1.0.0'

Retrofit is the REST API client that can send requests and receive response from our RESTful service. Gson converter is used to send and receive data as JSON (JavaScript Object Notation).

implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

With Glide, you can load and display media from many different sources, such as remote servers or the local file system. This dependency is to display the image of a product with its URL.

implementation 'com.github.bumptech.glide:glide:4.11.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'

Now we have added all the required dependencies for the product.
Battery Status: Android
By: Budhdi Sharma
Tags: Status, Battery, Android, AndroidDev, Adb

Battery status

if you want to know the battery status or hardware status of the android device, here you can see all the details using the ADB.

You can dump the battery status with the following command:

adb shell dumpsys battery

When I run the command, I get the following output:

battery status

although it is in the output, it temperature: 250 is the battery temperature. The

value is 10 times the temperature (Celsius), so 250 it 25 ℃ is a good idea.

The service class that manages battery status is BatteryService .

Battery status data is defined in HealthInfo .

Similarly, if want to check the audio status you can dumsys the audio using the following command:

adb shell dumpsys audio

Similarly, you can find other service dumpsys using the settings command.

adb shell dumpsys settings

I hope you enjoyed the small session. If you have any comments or questions or suggestions, please join the forum discussion below!

Thanks for the support( follow or Clapp)!!!!!
Navigate without using context in flutter/dart.
By: Akshay Papneja
Tags: Android App Development, Flutter, Android, AndroidDev, Flutter Developer

Let’s start

Hi coders. Yes, we can navigate without context easily with simple steps. GetX make it simple as well as reliable.

pubspec.yaml

get: ^3.23.1

get dependencies using,

flutter pub get

import

import 'package:get/get.dart';

Now, just replace your MaterialApp with GetMaterialApp inside main.dart

void main() {

runApp(GetMaterialApp();

}

Navigate to new screen:

Get.to(NextScreen());

Navigate to new screen with name.

Get.toNamed('/details');

To close snackbars, dialogs, bottomsheets, or anything you would normally close with Navigator.pop(context);

Get.back();

This package helps developers to reduce boilerplates form their code & makes the development faster, i know it will reduces irritation of yours.

That’s why i suggested that !!

Thanks me later.

For Reference go to the link below.

https://pub.dev/packages/get

If you like this article, just give me a Clap

Happy Coding !
Flutter : Adding Shimmer Effect To Your App
By: Akshay Papneja
Tags: Flutter, AndroidDev, Coding, Apps, Programming

Let’s Start

A shimmer effect is used to enhance the UI of our app while fetching data. A package provides an easy way to add shimmer effect in Flutter project.

Yeah ! …. That’s what I’m looking for.

Let’s create a shimmer,

Add package to your pubspec.yaml

pubspec.yaml

shimmer: ^1.1.2

get dependencies using,

flutter pub get

imports

import 'package:shimmer/shimmer.dart';

Now, let’s apply the shimmer widget.

Shimmer.fromColors(

baseColor: Colors.grey[300],

highlightColor: Colors.grey[100],

enabled: _enabled,

child: // your child,

);

Use like that for better user. (List)

Shimmer.fromColors(

baseColor: Colors.grey[300],

highlightColor: Colors.grey[100],

enabled: _enabled,

child: ListView.builder(

itemBuilder: (_, __) => Padding(

padding: const EdgeInsets.only(bottom: 10.0),

child: Row(

crossAxisAlignment: CrossAxisAlignment.start,

children: [

Container(

width: 48.0,

height: 48.0,

color: Colors.white,

),

const Padding(

padding: EdgeInsets.symmetric(horizontal: 8.0),

),

Expanded(

child: Column(

crossAxisAlignment: CrossAxisAlignment.start,

children: <Widget>[

Container(

width: double.infinity,

height: 8.0,

color: Colors.white,

),

const Padding(

padding: EdgeInsets.symmetric(vertical: 2.0),

),

Container(

width: double.infinity,

height: 8.0,

color: Colors.white,

),

const Padding(

padding: EdgeInsets.symmetric(vertical: 2.0),

),

Container(

width: 40.0,

height: 8.0,

color: Colors.white,

),

],

),

)

],

),

),

itemCount: 20,

),

)

Just user this instead of loader. Make a widget for better use & apply.

Thanks me later.

For reference click on the link here

If you liked this article, just give me a Clap

Happy Coding !
Android Studio Development Environment
Tags: Android App Development, AndroidDev, Android Apps, Android

Before you start developing your Android app, you need to take the first step set up a computer system as a development platform. Therefore the number of steps required to install the Java Development Kit (JDK) and Android Studio Integrated Development Environment (IDE), which also includes Android Software Development Kit (SDK). This chapter will walk you through the steps required to install the prerequisite Android components development of applications for systems based on Windows, Mac OS X and Linux.

System Requirements

Android application development can be performed on any of the following types of systems:

Windows Vista (32-bit or 64-bit)

Windows 7 (32-bit or 64-bit)

Windows 8 / Windows 8.1 or newer

Mac OS X 10.8.5 (Intel-based systems only)

Linux systems with version 2.15 or later of the GNU C library (glibc)

At least 2 GB of RAM (preferably 4 GB)

Approximately 4.5 GB of available disk space

Install the Java Development Kit (JDK)

The Android SDK was developed using the Java programming language. Same Android apps are also developed using Java. Received Java Development Kit (JDK) is the first component to install. Android development requires Standard Edition 7 to be installed. Java Platform Development Kit. Java is provided for both development (JDK) and runtime. (JRE) packages for Android development, you need to install the JDK.

Windows JDK Installation

For Windows systems, the JDK can be obtained from the Oracle Corporation website using

following url:

http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

Assuming a suitable JDK is not yet installed on your system, download version 7. The JDK that matches the target computer system. After loading run the installer executable and follow the onscreen instructions to complete installation process.

Read More….
How to open Bottom Sheet in Android Kotlin
Tags: Android App Development, Android Apps, Android, AndroidDev, Android Development

How to open Bottom Sheet in Android Kotlin Sudishkumar ·Dec 18, 2020

Bottom Sheets are surface components that hold supplementary screen content. it looks likes as a dialog . we can show UI what ever we want we can also handle click events.

we need a fragment for showing Bottom Sheet .

like this,

class BottomSheetFragment :BottomSheetDialogFragment() {// setup add your xml in the fragment

}

You can use this code for open your Bottom Sheet

val bottomSheetFragment = BottomSheetFragment()

bottomSheetFragment.show(supportFragmentManager, "bottom sheet")

You can use multiple UI components (TextView, ImageView , Buttom,……) and also you can add lists and handle click events

you can see my Bottom Sheet project on GitLab

https://gitlab.com/sudishkumar/buttomsheet-app

Thank you Friends, Have a good day and night.
As of my knowledge no. Making it foreground is what brings it top of the queue to execute.
By: Siva Ganesh Kantamani
Tags: Work Manager, AndroidDev, Programming

As of my knowledge no. Making it foreground is what brings it top of the queue to execute.
How to Retrieve Data From Firestore with Kotlin ?
Tags: Android App Development, Android, AndroidDev, Android Development, Android Application

How to Retrieve Data From Firestore with Kotlin ? Sudishkumar ·Dec 16, 2020

Google Firestore Provides No SQL database where we can keep data and it is a flexible, scalable database for mobile, web, and server development from Firebase and Google Cloud Platform.

For more about Google Firestore you can visit on bellow the link https://firebase.google.com/docs/firestore?authuser=0

Your project should be added in your Firebase Project

Add dependencies directly Open your project in android studio Tools>Firebase > Firestore> click on Add Dependencies

MainActivity.kt

var firestore: FirebaseFirestore

firestore = FirebaseFirestore.getInstance()

firestore.collection("users")

.get()

.addOnSuccessListener {

Toast.makeText(this, "Your first name is ${it.documents.get(0).data?.get("first_name") } and last name is ${it.documents.get(0).data?.get("last_name") }", Toast.LENGTH_SHORT).show()

}

.addOnFailureListener{

it.printStackTrace()

Toast.makeText(this, "Failed", Toast.LENGTH_SHORT).show()

}

}

That’s all , Thank you for reading my article

you can see my project on GitLab

https://gitlab.com/sudishkumar/retrieve-data-from-firebase-kotlin
Why Are Kotlin Synthetics Deprecated and What Are the Alternatives?
By: Sahil Sharma
Tags: Android App Development, Android, AndroidDev, Programming, Kotlin

Why Are Kotlin Synthetics Deprecated and What Are the Alternatives?

Photo by Louis Tsai on Unsplash

Recently Android has announced that with Kotlin 1.4.20, their Android Kotlin Extensions Gradle plugin will be deprecated and will no longer be shipped in the future Kotlin releases.

Android Kotlin Extensions plugin brought with it two very cool features :

Synthetics let you replace calls to findViewById with kotlinx.android.synthetic bindings.

let you replace calls to with bindings. Parcelize allows you to remove boilerplate and easily create Parcelables through the @Parcelize annotation.

And with the deprecation of this plugin, we will no longer be able to use these features. Don’t worry about Parcelize, as it will be now shipped as a standalone plugin: kotlin-parcelize. But this is definitely going to be the end for Kotlin Synthetics.

Now Android developers all across the globe, have, with a very heavy heart, to say goodbye to Kotlin Synthetics. But first, let's understand why Kotlin Synthetics was introduced in the first place, why it’s deprecated now, and what the options are for us apart from it.
Git Flow
By: Leandro Castillo
Tags: Android App Development, Android Apps, Android, AndroidDev, Peru

leandro1995 - Overview

Arctic Code Vault Contributor Dismiss Sign up for your own profile on GitHub, the best place to host code, manage…
How to Find App UID
By: Budhdi Sharma
Tags: Android App Development, System, User Id, Android, AndroidDev

Unique

Android assigns each application a UID( userID) at the install time. Unlike PID (Process ID) which is transient and keeps changing all the time, UID stays constant as long as the application is not reinstalled.

The UID should be unique to each application, except when the application explicitly requests to share a userID with another application, i.e. there are security restrictions around this, the two applications must be signed with the same private key.

Android uses the UID to set up a kernel-level Application Sandbox. The kernel enforces security between apps and the system at the process level through standard Linux facilities such as user and group IDs that are assigned to apps. By default, apps can’t interact with each other and have limited access to the OS. If app A tries to do something malicious, such as read application B’s data or dial the phone without permission, it’s prevented from doing so because it doesn’t have the appropriate default user privileges. The sandbox is simple, auditable, and based on decades-old UNIX-style user separation of processes and file permissions.

How to find out the UID of a process:

Enter adb shell mode and issue the ps command.

# ps

The following results can be obtained.

USER PID PPID VSIZE RSS WCHAN PC NAME

system 198 35 129244 33328 ffffffff 40011384 S com.android.settings

app_9 224 35 145148 45552 ffffffff 40011384 S android.process.example

app_0 244 35 128604 33296 ffffffff 40011384 S com.android.calendar

app_15 277 35 125664 32712 ffffffff 40011384 S com.android.deskclock

This time I will check the UID of example.

From the result of the ps command, you can see that the USER of example is “app_9”.

Then switch users with the su command.

# su app_9

You can then find the UID by issuing the id command.

$ id

The execution result is as follows. The UID of example seems to be 10009.

uid = 10009 (app_9) gid = 10009 (app_9)

I hope you enjoyed the small session. If you have any comments or questions or suggestions, please join the forum discussion below!

Thanks for the support( follow or Clapp)!!!!!
How we developed a mobile solution for WTCC Premium TV
Tags: Streaming Video, AndroidDev, Mobile App Development, iOS App Development, Cross Platform

We launched our new online service in France a couple of years ago. WTCC Premium TV helps to take a new look at the coverage of the FIA World Touring Car Championship. For the convenience of consumers, we made many variants of the WTCC Premium TV. The web edition and two versions for the most popular iOS and Android smartphone platforms. All of them allow users to gain total control of the video: rewind, pause, and play or watch it live from the last stop.

Cross-platform software based on React Native for iOS and Android

To create apps that allow users to completely enjoy watching their favorite championship, we used Ruby and Ruby On Rails. A user can rewind, pause and play from the last stop or watch it live and take full control of the video. Check details on favorite teams or see the best moments of the race.

WTCC characteristics
Android Firebase Push notification intent extras null
By: Cazimir Roman
Tags: Android App Development, AndroidDev, Android

Problem

When testing the Firebase notifications the other day I noticed that a specific logic was not executed in my app upon tapping the notification in the notification drawer. I needed to route the user to a specific fragment in my app. This is the payload I send from Firebase:

You can get this information in Android in onCreate or onResume:

val extras = intent.extras



if(extras != null) {

extras.getString("regards")?.let {

scrollViewPager(2)

}

}

The above code checks is there are extras attached to the intent that opened the activity (in our case: the notification tap). If there are extras, check if the regards extra is available and scroll the viewpage to position 2 if the value is found. Sounds easy enough, right?

If works when the app is fully closed and no instance is running but once you have the app running in the background, there are no extras returned if using the above code snippet.

The solution

The solution is to override the onNewIntent() method and check the existence of the extras here as well. Now tapping on the notification while the app is in background will correctly forward the intent to this method and execute the desired logic.

override fun onNewIntent(intent: Intent?) {

super.onNewIntent(intent)



val extras = intent?.extras



if(extras != null) {

extras.getString("regards")?.let {

scrollViewPager(2)

}

}

}

Before you go…

If you found this article helpful, click the ❤️ or 👏 button below or share the article on Facebook so your friends can benefit from it too.
Best Android App Development company
By: Khushbu Muchhadiya
Tags: Android App Development, Android Apps, Android, AndroidDev, Android App Developers

The smartphone segment is booming, and so do the Android app world, which holds roughly 80% of the market share.

We understand that each and every business has its own needs and target audience. That is why we incorporate a completely tailored plan that is based on the ideology to draft your business objective into a catchy Android app.

Data EximIT is one of the best Android App development company offers a full range of highly innovative and out of the box Android app development based on the Android platform that helps the business to enhance their marketing strategy and in acquiring a large number of customers in the market.

Visit at www.dataeximit.com | Write to us at sales@dataeximit.com | Call Us: +161–97–986983
Android Wireless Debugging Helper: WiFiADB
By: Homan Huang
Tags: Android App Development, AndroidDev, Wireless

⌨1. Here is the Old Way

In the old way, I have to use CLI or terminal to solve the technique.

Open a terminal or CLI:

Use a USB cable to connect the Android phone. (If it is a new phone, please turn on the developer mode by tabbing Settings/About Phone/Build number, 7 times.) Answer to the alert window to turn on the debugger.

Check device:

> adb devices

List of devices attached

ZY326LVCZQ device

Set TCPIP:

> adb tcpip 5555

restarting in TCP mode port: 7575

Next, you have to find the phone IP at Settings/About Phone. Mine is :

IP address

fd80::2646:c8ff:fe41:f500

192.168.1.73

...

Back to the terminal:

> adb connect 192.168.1.73:5555

connected to 192.168.1.73:5555

Check devices again:

> adb devices

List of devices attached

ZY326LVCZQ device

192.168.1.73:5555 device

Now, it’s ready. You can detach the USB cable.
Get App crash info using getHistoricalProcessExitReasons
By: Nav Singh
Tags: Android App Development, Crash, Android, AndroidDev, Crash Reporting

As you have seen above that getHistoricalProcessExitReasons method returns MutableList of type ApplicationExitInfo.

Let's check what information ApplicationExitInfo object provides us.

There is a lot of information that it provides us related to crash 👇

Information provided by ApplicationExitInfo object

Here, I will discuss only reason, you can learn more about the ApplicationExitInfo object here

you can learn more about the object here Reason can be one of the following :
Android Dependency Injection-Koin
By: Recep Yeşilkaya
Tags: Android, Dependency Injection, AndroidDev, Kotlin, Koin

rcpyesilkaya/Koin-Sample

GitHub is home to over 50 million developers working together to host and review code, manage projects, and build…
Fragmentlar arası iletişim — FragmentResult
By: Fevzi Ömür Tekin
Tags: Android, AndroidDev, Fragments, Fragmentresult, Kotlin

fevziomurtekin/android-fragment-result

You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
Android data Binding
By: Asif Saifi
Tags: Android App Development, Android Data Binding, AndroidDev, Android

I am an experienced Android Developer who have skills on Android architecture components like Live data , view model , data binding , RxJava , MVVM
Nested ViewPager2. Before we begin, I am dropping the link…
By: Ege Bircan
Tags: Android App Development, Android, AndroidDev, Software Development, Mobile App Development

Before we begin, I am dropping the link of the repository so you can either follow along or experiment after.

ViewPager2 is a great improvement over ViewPager but it introduced an unexpected behaviour and aim of the article is to show you how to workaround over that.

In the demo project above, we have a single ViewPager2 (in MainFragment.kt) with 2 fragments (Fragment1 and Fragment2).

Let’s add a ViewPager2 inside Fragment1 which will be responsible for displaying Fragment3 and Fragment4.

For those who find the fragment hierarchy a little confusing, we have a MainFragment, MainFragment has 2 children inside a view pager (Fragment1 and Fragment2). Now we intend to add a new view pager in Fragment1. This new view pager will render Fragment3 and Fragment4. So Fragment1 will be the parent of these new fragments.

Fragment1.kt file should look like below now:

We also need to modify our layout XML file accordingly:

We naturally expect this to be enough for us but unfortunately we’ve got to do more to make it work.

As you can see, when I slide to the left while the cursor is on the Fragment1’s area, Fragment2 is displayed. No problem so far.

When I slide again while the cursor is on Fragment3’s area, we expect to see Fragment4. Because we are in the child view pager now, not the parent.

But what’s happening is, we see Fragment2 again. Now that is a serious problem. In simple terms, parent view pager overrides the listeners of the child view pager for some reason.
Creating Different Build Variants in Android
By: Amit Shekhar
Tags: Android App Development, Android Apps, Jetpack, Android, AndroidDev

Learn more. Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Make Medium yours. Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore
Top 10 resources to learn Android Development
Tags: Android App Development, AndroidDev, YouTube, Website, Programming

What is android, basically android is an operating system that is worldwide use in mobile devices. Android is an open-source Linux-based OS, Market sharing anyone can develop an application and I must say you can also develop your own and publish it on google play store.

Android application can run on any type of device, screen, size which have android also has Geo-location and social networking using features of android peoples can share their ideas, location using social networking like as WhatsApp, Facebook, etc.

How to learn android?

If your search takes you here that means you almost know about android. But the query is that you want to make an android application on your own, then this blog is for you, it will help you that how to learn android development and from where you have to start first. Here are the topmost resources for learning android development from the beginning to the growth of your carrier knowledge.

Originally published at https://techyxperts.com on 7 December 2020.
ViewBinding: Creating BaseClasses 🛠
By: Chetan Gupta
Tags: Jetpack, Android, AndroidDev, Java, Kotlin

That’s it! copy these snippets and you will have ready-to-use ViewBinding Classes in your codebase.

It’s not just Another ViewBinding Article 👇🏻

TLDR: You will Learn

There are many view binding articles out now, what values does it add? after completing this one you would be familiar with these points

View-binding not working in all the modules? Why your fields are not getting generated?

How to view the source code of your generated binding classes?

Generated classes are Kotlin or Java? and why?

Do View-binding views are never null?

How to access included views? <include> and <merge> tags?

How to bind Activities, Fragments, Adapters, and CustomViews?

When to use bind and Inflate?

Controlling ViewBinding Generation?

Reducing boilerplate code with Delegates and Base-Class for ViewBinding in Activity and Fragments?

Common mistakes and Anti-patterns in ViewBinding?

Until next time. Happy Hacking! 👩‍💻

Stalk Me 👀 :

LinkedIn | Twitter | StackOverflow | Github | Youtube | WorkX | About Me
How to make a RecyclerView in Jetpack Compose — Part 1
By: Ian Alexander
Tags: Android App Development, Android, AndroidDev, Programming, Jetpack Compose

Written as of alpha08. Compose is evolving rapidly so some syntax may have changed.

Edit — updated syntax with alpha09 changes

If you’ve developed for android you’ve inevitably come across RecyclerView , it’s a massive improvement over ListView which came before, but still pretty far from fun. Making a RecyclerView involves a messy pile of boilerplate — often difficult to re-use between screens — and complexity even for basic tasks, like headers, item callbacks, and multiple item types.

How does Jetpack Compose make lists simpler?

Creating a list in compose

Creating a list in compose is ridiculously easy. No adapters. No view holders.

All you need is a defined data structure and composables to build list items. That’s really it. No joke.
Generate an Android Archive(AAR) Using Android Studio and Add to an Android Project
By: Narendra Harny
Tags: Android App Development, Android Apps, Android, AndroidDev, Android Development

Please follow the steps>>

Step1: Start the Android Studio and open the project where you want to generate the AAR file.

Step2: Click the Gradle option in right most corner of android studio.

Step3: You will see the App name in the window, please unfold the options in the sequence shown below.

It might take a few minutes, If the Build task is successfully completed It will show the message.

Step4: The generated AAR files will be located here(According to your Library name)

Step5: Now we can add the archive file into another Android Project so create a new Android Project.

Step6: After creating a new project >> Click on File>> Project Structure >> Modules >> “+” icon >>

Next>> The below window will have an option to select “Import AAR/JAR”

Next>> Click on next after selecting the “Import AAR/JAR” and in the next window select the AAR file path and click Finish.

Note: Take the AAR file generated in the previous project or use the AAR file you want to add.

Step7: Verify in settings.gradle file, the library module will be included.

Step8: Add the library module into the module Gradle file where this AAR file implementation is needed.

app module gradle

Step9: “Sync the project” and wait for the build successful.

Step10: Verify the classes available in the Library module is accessible in the module you have added the AAR file.

Classes available from AAR Library module

Step11: Now you can write the code for using the AAR library module in your Android Project.

Thanks!! Please add comments If you face any issues while implementing.
Salient Features of 5G That Will Influence Mobile App Development
By: Shiv Technolabs Pvt. Ltd.
Tags: Android App Development, Android Apps, Hire Android Developers, AndroidDev, Mobile App Development

Today, 5G technology is growing faster than ever. It has created an entirely new communication architecture that will offer enhanced services to all its users. Hence, the future of app development will experience a revolutionary change with the rolling out of 5G.

The following are top features of 5G that will enhance the Mobile App Development in the Coming Years:

Faster speed

5G offers you a smooth and fast cellular connection. Fun fact, it promises 100 times the speed offered by 4G networks as per Intel. The 5G data transfer speeds will range from 50 Mbit/s to over 2 Gbit/s, lightning-fast downloads and file transfers are around the corner.

Low Latency

As for now, 4G networks can exhibit an average latency of 50 milliseconds. Whereas 5G assures to slash this to just one millisecond. 5G provides you a URLIC (Ultra-Reliable Low Latency Communication) which allows data to be transferred between devices in real-time with minimum hindrance.

5G offers less network interference and delays, mobile apps will perform better, and enhanced UX.

Increased Connection Density

As we know 4G can connect with about 2,000 devices within 0.38 square miles. However, 5G opens up a whole new arena for mobile app developers in the realm of the Internet of Things.

Enhanced Capacity

It happens, several times service providers often struggle to provide uninterrupted connectivity to large audiences. The good news is 5G can make it possible by increasing the speed and connection densities. In short 5G helps to enhance your business capacities.

5G provides you a great optimization of network traffic and smoother handling of usage spikes as hundreds of thousands of devices seamlessly communicate with sensors, machines, hardware, and whatnot. In short, 5G will help industries scale as they match their technology initiatives with their goals.

Increased Bandwidth

5G has features all the previous cellular spectrums. It provides you a better connectivity through horizon with higher radio frequencies (in the 30 GHz to 300 GHz range) and shorter wavelengths than 4G.

Improved Precision

5G supports better precision capabilities and improved responsiveness by increasing the bandwidth. 5G is essential for high-precision GPS-enabled services.

Summing up:

Apart from the above, 5G network launches accelerate. For a great Android app development service, you can visit Shiv Technolabs a leading Android app development company provides you service for an emerging market for every component, device, and software service necessary to facilitate the data-intensive environment.
State Machine in Android (Part 1): Why and How?
By: An Nguyen
Tags: Android App Development, Android, AndroidDev, State Machine, UI

Now your processes are clearer that helps your coworkers follow your logic easier and greatly support your maintenance.

Transforming state chart to code:

There are several options to go from here. We could either write our own state machine library or using a third-party one. In this article, I pick the State Machine library from Tinder’s team, which is great work from the team and suits all of the needs to drive our logic.

Firstly, Let’s transform our states, events, and side effects into code:

And put our new classes into the new state machine class:

class UserDataStateMachine() {

val stateMachine = StateMachine.create<

UserDataState,

UserDataEvent,

UserDataSideEffect> {



}

}

We need to indicate an initial state that helps the library know which state the state machine needs to be assigned whenever it is created.

val stateMachine = StateMachine.create<

UserDataState,

UserDataEvent,

UserDataSideEffect> {

initialState(UserDataState.DataUnloaded)

}

Next, we will define the event for every state and also the side effect of each event (if it has any).

Let’s start with the DataUnloaded state first.

...

initialState(UserDataState.DataUnloaded)

// DataUnloaded state

state<UserDataState.DataUnloaded> {

on<UserDataEvent.StartLoadingData> {

transitionTo(

state = UserDataState.DataLoading,

sideEffect = UserDataSideEffect.StartLoader

)

}



on<UserDataEvent.AppGetBackgrounded> {

transitionTo(UserDataState.DataUnloaded)

}

}

...

The above code defines that when the state machine current state is DataUnloaded and it gets:

the StartLoadingData event, the state machine will be moved to DataLoading state and also execute the StartLoadingData side effect.

event, the state machine will be moved to state and also execute the side effect. the AppGetBackgrounded event, the state machine will be moved to DatUnloaded state.

Apply the same mechanism to the other states, and we will have:

With that, we finish creating a state machine from the statechart.
Implementation of Firebase Performance Monitoring
By: Nwokocha Wisdom Maduabuchi
Tags: Performance Monitoring, Android App Development, Android, AndroidDev, Firebase

In this tutorial, you will learn how to implement Firebase Performance monitoring in your Android project.

What is Firebase Performance Monitoring

Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your iOS, Android, and web apps.

You use the Performance Monitoring SDK to collect performance data from your app, then review and analyze that data in the Firebase console. Performance Monitoring helps you to understand where and when the performance of your app can be improved so that you can use that information to fix performance issues.

It is very important to have it in your app especially if you want your app to grow in the right direction, below are the benefits of it.

Benefits of Performance Monitoring

When you add the Performance Monitoring SDK, Firebase automatically starts collecting data for several common processes in your app thereby it does the following.

Helps you improve the performance of your app

It shows you performance metrics

it's lightweight

Getting started

follow the guide below to set up performance monitoring

Step 1: Connect/Create your project to Firebase

Learn how to connect /create a firebase project in this link https://wise4rmgodadmob.medium.com/how-to-connect-your-android-studio-project-to-firebase-a5f5c4d67e87

Step 2: Add the Performance Monitoring SDK to your app

to add the necessary dependencies click “Add Performance Monitoring ”

Click on “Accept Changes” to add them to your dependencies

Goto the firebase console

At this point, you will have to wait for a few minutes so that your project will be detected.

In a few minutes time, you will start seeing the results

Thanks for reading my article

Let’s connect on

Twitter: https://twitter.com/Joklinztech

LinkedIn: https://www.linkedin.com/in/wisdom-nwokocha-76212a77/
Mempercepat launch Aplikasi Android, dengan App-Startup⚡️
By: Dony Nuransyah
Tags: Android App Development, Androidbandung, AndroidDev, Evermostech, Evermos

love to build things from nothing, i have second account kadaluarsa.medium.com
ActivityResult API Android…
By: Nav Singh
Tags: Android App Development, Jetpack, Android, AndroidDev, Androidx

Now we will see how the above mentioned use-case’s👆 implementation got more easier with ActivityResult API

First things First :

Dependencies : Add the 👇 following 2 dependencies in your app level build.gradle file

// check the latest version @Android released notes

implementation "androidx.activity:activity-ktx:1.2.0-beta02"

implementation 'androidx.fragment:fragment-ktx:1.3.0-beta02'

Request permissions : There are 2 ways to request permissions provided by this API.

ActivityResultContracts.RequestPermission()) : If you want to request single permission this contract will do the job for you.

Create ActivityRequestLauncher with RequestPermisison contract

Lambda in the following code 👇 will execute when the request finishes, you can call it onRequestPermissionsResult.

It returns Boolean in this case based on if permission is granted or not

Now that’s it you are good to go to request any permisison and it will do the job for you

There are many other prebuilt contract provided by API that you can use directly like RequestPermisison. Check the Reference section to learn more about.

If you want to request multiple permissions use the following contract:

Here result 👆 is of type Map<String,Boolean>, which have permission name as a key and value based on if permision is granted or not