Unit4 - Subjective Questions

CSE227 • Practice Questions with Detailed Answers

1

Define Artificial Intelligence (AI) in the context of mobile applications. Discuss at least three significant benefits and two common challenges of integrating AI into Android apps.

2

Discuss at least four distinct use cases where AI is currently enhancing Android applications, providing a brief explanation for each.

3

Explain the role and significance of AI assistants in enhancing the Android user experience. Provide examples of how they integrate with the operating system and various applications.

4

Compare and contrast Google's Gemini and OpenAI's ChatGPT. Highlight their architectural differences, core strengths, and primary use cases.

5

Explain what an AI API is and describe its fundamental purpose in mobile app development. How does it abstract complexity for developers?

6

Describe the concept of REST APIs and explain how they facilitate communication between an Android app and an AI service. What are the key components of a RESTful request?

7

Explain the critical role of API keys in accessing and securing AI APIs. Discuss best practices for their management within an Android application.

8

Outline the high-level steps involved in integrating the Google Gemini API into an Android application, assuming a new project setup.

9

Describe the typical project setup required in Android Studio to begin using the Google Gemini API, including Gradle configurations and API key management.

10

Explain how to instantiate and configure the Google Gemini client within an Android application for making AI API calls. Provide a basic Kotlin code example.

11

Discuss the various parameters and options available when generating AI text responses using a model like Gemini. How do these parameters influence the output quality and style?

12

Illustrate, with a conceptual Kotlin code snippet, how an Android app would make a request to the Google Gemini API for text generation and process the immediate response. Focus on asynchronous execution.

13

Explain different strategies for handling diverse user inputs (text, voice, image) before sending them to an AI API like Google Gemini in an Android application.

14

Describe the process of parsing and displaying AI-generated text responses in an Android UI, considering aspects like formatting, interactivity, and potentially long responses.

15

How would you implement a conversational flow using an AI API in an Android app, ensuring context is maintained across multiple turns of interaction?

16

Identify common errors that can occur when interacting with AI APIs from an Android application and suggest robust error handling mechanisms.

17

Explain the importance of understanding and adhering to AI API usage limits. What strategies can an Android developer employ to manage these limits effectively?

18

Discuss different types of API errors (e.g., authentication, rate limiting, invalid request) and how to differentiate and handle them programmatically in an Android app.

19

Discuss the potential ethical considerations and biases when integrating AI models like ChatGPT or Gemini into Android applications. How can developers mitigate these issues?

20

Discuss the advantages and disadvantages of using a cloud-based AI API (like Gemini) versus an on-device AI model in an Android application. When would you choose one over the other?