In this video it shows the steps to integrate the AI (Artificial intelligence) tools, such as Gemini and Amazon Q, using the Plugins in Android Studio.
I hope you like this video. For any questions, suggestions or appreciation please contact us at: https://programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Complete source code and other details/ steps of this video are posted in the below link:
package com.programmerworld.aitoolsproject;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
add(2,3);
subtract(2,3);
return insets;
});
}
public static int add(int num1, int num2) {
int sum = num1 + num2;
return sum;
}
public static int subtract(int num1, int num2) {
int difference = num1 - num2;
return difference;
}
}
Screenshots:
Steps:



Restart the Android Studio.
For below prompt in Gemini:
“write a java method to add 2 numbers”

Reference: