MahavirPolytechnic,Nashik
(Year: 2024-2025)
Micro Project
Program: Diploma in Information Technology
Semester: Sixth
Course: Mobile Application Development
Course Code: 22617
Title of the Project: News App
Member of the Group:
1. Leena Dinesh Patil Enrollment No:- 2205300167
1
Mahavir Polytechnic
Vision
We strive to educate students to become industry ready engineers having professional attitude and
groomed personality.
Mission
M1. To provides well defined system to ensure quality education by strengthening teaching learning
processes through innovative practices.
M2. To provides a platform where students are exposed to the industry, up bridged with the industry
standards and requirements.
M3. To train students by teaching them leadership and teamwork skills.
M4. To groom students enriching their personality and social values.
IT Department
VISION
IT Department strives to educate students to become Industry ready Engineers having Professional
attitude and groomed personality.
MISSION
M1. To provides well defined system to ensure quality education by strengthening teaching learning
processes through innovative practices.
M2. To provides a platform where students are exposed to the industry, up bridged with the industry
standards and requirements.
M3. To train students by teaching them leadership and teamwork skills.
M4. To groom students enriching their personality and social values.
2
PART A
1.0 Brief Introduction:
A News Application is a mobile platform that provides users with access to the latest news and updates
from various sources. The app aggregates news articles, headlines, and breaking stories on topics such
as politics, sports, technology, entertainment, and more. This project focuses on developing a
functional prototype of a News App that allows users to customize their feed, search for articles, and
stay informed.
The application will be designed to be user-friendly, fast, and efficient, ensuring users receive real-
time updates in an organized and visually appealing format.
2.0 Aim/Benefits of the Micro – Project
To design and develop a News Application that delivers real-time news updates, categorizes news by
topics, and offers a personalized user experience.
Benefits:
1. Real-Time Information:
2. Personalization:
3. Skill Development:
4. Career Readiness:
3.0 Course Outcomes Addressed
a. Interpreted features of Android operating system.
b. Configure Android environment and development tools.
c. Develop rich user Interfaces by using layouts and controls.
d. Use User Interface components for android application development.
e. Create Android application using database
4.0 Proposed Methodology
1. Requirement Analysis: Identify the features required for the News App (e.g., real-time updates,
search, and notifications).
2. Design Phase: Create wireframes and mockups of the app interface.
3. Development Phase: Code the app using a framework like Flutter or Android Studio (Java/Kotlin).
Integrate APIs (e.g., NewsAPI) for fetching news articles.
4. Testing Phase:Test the app for bugs, errors, and performance issues.
5. Deployment: Deploy the app on an emulator or mobile device for demonstration.
3
MICRO PROJECT
Progress Report / Weekly Report
Week Duration Sign of the
Date Work / Activity Performed
No in Hrs. Faculty
1 3 Search micro-project name
2 1 Final micro-project name
3 4 Search information about Our project
4 3 Study about micro-project information
5 1 Presentation
6 1 Correction on project
7 4 Report of micro-project
8 1 Submission of report
5.0ResourcesRequired
NameOf
Sr. No Specifications Quantity Remarks
Resource/Material
1 Operating system Windows 7 8GB RAM 1 -
2 Software Android studio 1 -
Computer processor(i3-i5)
3 Computer system 1 -
RAM 8 GB
Sign of Course Teacher
4
REPORT
1.0 Rationale
In the digital era, staying updated with the latest news is crucial. Traditional methods like newspapers
and TV broadcasts are increasingly being replaced by digital platforms. This project aims to provide an
accessible, personalized, and fast way for users to consume news through a mobile application.
The rationale for developing a News App is to combine real-time updates with a customizable user
experience, helping users stay informed about topics of interest in a convenient format.
2.0 Aim/Benefits of the Micro – Project
Aims:
To develop a functional prototype of a News Application that provides real-time updates, topic
categorization, and search functionality to enhance user engagement and accessibility.
Benefits:
1. Convenience: Offers users easy access to news updates on their mobile devices.
2. Customizability: Enables users to personalize their feed by selecting categories of interest.
3. Efficiency: Saves time by aggregating news from multiple sources in one platform.
4. Learning Opportunity: Equips students with practical experience in mobile app development.
3.0 COs addressed by the Micro Project:
CO 1: Interpreted features of Android operating system.
CO 2: Configure Android environment and development tools.
CO 3: Develop rich user Interfaces by using layouts and controls.
CO 4: Use User Interface components for android application development.
CO 5: Create Android application using database
4.0 Literature Review
1. News Evolution: Mobile apps replaced traditional news sources due to their convenience and real-time
updates.
2. APIs: Tools like News API help fetch news quickly from multiple sources.
3. Personalization: Customizable features and AI improve user experience and engagement.
5.0 Actual Methodology
• Planning
• Research
• Study
• Design
• Development
• Testing
5
Uses of the News Application:
• Provides real-time updates on breaking news and current affairs.
• Serves as a platform for users to explore news across various categories (e.g., politics, sports,
entertainment).
• Delivers location-based news updates for local relevance.
• Acts as an educational tool for students to stay informed about global events.
Advantages and Disadvantages:
Advantages: -
1. Real-Time Updates: Users receive instant notifications for breaking news.
2. Personalized Experience: Allows users to customize their news feed based on interests.
3. Accessibility: Available 24/7, ensuring users stay informed anytime, anywhere.
4. Wide Coverage: Aggregates news from multiple sources to provide diverse perspectives.
5. Cost-Effective: Free or subscription-based apps reduce the need for physical newspapers.
Disadvantages: -
• Information Overload: Excessive updates can overwhelm users.
• Fake News Risks: Users may encounter unverified or misleading information.
• Dependency on Internet: Requires an active internet connection for real-time updates.
• Privacy Concerns: Collecting user preferences might lead to privacy issues.
• Battery Consumption: Frequent notifications and background updates can drain device batteries
6
6.0Actual Resources Used: -
NameOf
Sr. No Specifications Quantity Remarks
Resource/Material
1 Operating system Windows 7 1 -
2 Software Android studio 1 -
Computer processor(i3-i5)
3 Computer system 1 -
RAM 8GB
7.0 PROGRAM:
Main [Link]
package [Link].news24
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link].*
class MainActivity : AppCompatActivity() {
private lateinit var newsAdapter: NewsAdapter
private lateinit var swipeRefresh: SwipeRefreshLayout
private val newsApiKey = "8ffd2d3c56ab4bb1aba395072c385350"
private val CONNECTION_TIMEOUT = 15000 // 15 seconds timeout
override fun onCreate(savedInstanceState: Bundle?) {
[Link](savedInstanceState)
setContentView([Link].activity_main)
swipeRefresh = findViewById([Link])
val recyclerView = findViewById<RecyclerView>([Link])
newsAdapter = NewsAdapter { news ->
// Open news article in browser
7
val intent = Intent(Intent.ACTION_VIEW, [Link]([Link]))
startActivity(intent)
}
[Link] = newsAdapter
[Link] {
fetchNews()
}
fetchNews()
}
private fun fetchNews() {
[Link] = true
CoroutineScope([Link]).launch {
try {
// Using everything endpoint with proper query parameters
val url =
URL("[Link]
=$newsApiKey")
val connection = [Link]() as HttpURLConnection
// Set connection timeout
[Link] = CONNECTION_TIMEOUT
[Link] = CONNECTION_TIMEOUT
[Link] = "GET"
// Set required headers
[Link]("X-Api-Key", newsApiKey)
[Link]("User-Agent", "News24")
[Link]("Accept", "application/json")
// Check response code
val responseCode = [Link]
if (responseCode != HttpURLConnection.HTTP_OK) {
val errorStream = [Link]?.bufferedReader()?.use { [Link]() }
val errorMessage = try {
JSONObject(errorStream ?: "").optString("message", "Unknown error occurred")
} catch (e: Exception) {
"Server returned error code: $responseCode"
}
throw Exception(errorMessage)
}
val response = [Link]().use { [Link]() }
val jsonObject = JSONObject(response)
if ([Link]("status") == "ok") {
val articles = [Link]("articles")
val newsList = mutableListOf<News>()
for (i in 0 until [Link]()) {
val article = [Link](i)
val news = News(
title = [Link]("title"),
description = [Link]("description") ?: "No description available",
8
imageUrl = [Link]("urlToImage") ?: "",
source = [Link]("source").getString("name"),
publishedAt = formatDate([Link]("publishedAt")),
url = [Link]("url")
)
[Link](news)
}
withContext([Link]) {
if ([Link]()) {
[Link](this@MainActivity, "No Maharashtra news found at the moment",
Toast.LENGTH_LONG).show()
} else {
[Link](newsList)
}
[Link] = false
}
} else {
withContext([Link]) {
val errorMessage = [Link]("message", "Unknown error occurred")
[Link](this@MainActivity, "Error: $errorMessage", Toast.LENGTH_LONG).show()
[Link] = false
}
}
} catch (e: Exception) {
withContext([Link]) {
val errorMessage = when (e) {
is [Link] -> "No internet connection. Please check your network."
is [Link] -> "Server is not responding. Please try again later."
is [Link] -> "Could not connect to server. Please check your internet connection."
else -> "Error: ${[Link]}"
}
[Link](this@MainActivity, errorMessage, Toast.LENGTH_LONG).show()
[Link] = false
}
}}}
private fun formatDate(dateString: String): String {
return try {
val inputFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'", [Link]())
val outputFormat = SimpleDateFormat("MMM dd, yyyy HH:mm", [Link]())
val date = [Link](dateString)
[Link](date!!)
} catch (e: Exception) {
dateString
}
}
}
9
New [Link]
package [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link]
import [Link].news24.R
import [Link]
class NewsAdapter(private val onItemClick: (News) -> Unit) :
[Link]<[Link]>() {
private var newsList = listOf<News>()
fun updateNews(news: List<News>) {
newsList = news
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NewsViewHolder {
val view = [Link]([Link])
.inflate([Link].item_news, parent, false)
return NewsViewHolder(view)
}
override fun onBindViewHolder(holder: NewsViewHolder, position: Int) {
[Link](newsList[position])
}
override fun getItemCount() = [Link]
inner class NewsViewHolder(itemView: View) : [Link](itemView) {
private val imageView: ImageView = [Link]([Link])
private val titleView: TextView = [Link]([Link])
private val descriptionView: TextView = [Link]([Link])
private val sourceView: TextView = [Link]([Link])
fun bind(news: News) {
[Link] = [Link]
[Link] = [Link]
[Link] = [Link]
[Link]([Link])
.load([Link])
.placeholder([Link].placeholder_image)
.into(imageView)
[Link] { onItemClick(news) }
}
}
10
Gradle Properties
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# [Link]
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
[Link]=-Xmx2048m -[Link]=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. For more details, visit
# [Link]
# [Link]=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# [Link]
[Link]=true
# Kotlin code style for this project: "official" or "obsolete":
[Link]=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
[Link]=true
[Link]
[versions]
agp = "8.9.1"
kotlin = "2.0.21"
coreKtx = "1.15.0"
junit = "4.13.2"
junitVersion = "1.2.1"
espressoCore = "3.6.1"
appcompat = "1.7.0"
material = "1.12.0"
activity = "1.10.1"
constraintlayout = "2.2.1"
[libraries]
androidx-core-ktx = { group = "[Link]", name = "core-ktx", [Link] = "coreKtx" }
junit = { group = "junit", name = "junit", [Link] = "junit" }
androidx-junit = { group = "[Link]", name = "junit", [Link] = "junitVersion" }
androidx-espresso-core = { group = "[Link]", name = "espresso-core", [Link] =
"espressoCore" }
androidx-appcompat = { group = "[Link]", name = "appcompat", [Link] =
"appcompat" }
material = { group = "[Link]", name = "material", [Link] = "material" }
androidx-activity = { group = "[Link]", name = "activity", [Link] = "activity" }
androidx-constraintlayout = { group = "[Link]", name = "constraintlayout",
[Link] = "constraintlayout" }
[plugins]
android-application = { id = "[Link]", [Link] = "agp" }
kotlin-android = { id = "[Link]", [Link] = "kotlin" }
11
[Link]
<manifest xmlns:android="[Link]
xmlns:tools="[Link]
<uses-permission android:name="[Link]"/>
<application android:allowBackup="true" android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:roundIcon="@drawable/ic_launcher"
android:supportsRtl="true" android:theme="@style/Theme.News24" tools:targetApi="31">
<activity android:name=".MainActivity" android:exported="true">
<intent-filter>
<action android:name="[Link]"/>
<category android:name="[Link]"/>
</intent-filter>
</activity>
</application>
</manifest>
Acitivity_main XMl
<[Link]
xmlns:android="[Link]
xmlns:app="[Link] android:id="@+id/swipeRefresh"
android:layout_width="match_parent" android:layout_height="match_parent">
<[Link] android:id="@+id/newsRecyclerView"
android:layout_width="match_parent" android:layout_height="match_parent"
app:layoutManager="[Link]"/>
</[Link]>
Item_news..xml
<[Link] xmlns:android="[Link]
xmlns:app="[Link] android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_margin="8dp" app:cardCornerRadius="8dp"
app:cardElevation="4dp">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
android:orientation="vertical" android:padding="8dp">
<ImageView android:id="@+id/newsImage" android:layout_width="match_parent"
android:layout_height="200dp" android:scaleType="centerCrop"/>
<TextView android:id="@+id/newsTitle" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="8dp" android:textSize="18sp"
android:textStyle="bold"/>
<TextView android:id="@+id/newsDescription" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="4dp" android:maxLines="3"
android:ellipsize="end"/>
<TextView android:id="@+id/newsSource" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_marginTop="4dp" android:textStyle="italic"/>
</LinearLayout>
</[Link]>
12
OUTPUT:
13
14
8.0 Skill Developed / Learning outcome:-
1. Technical Expertise: Learned to use APIs and frameworks for mobile app development.
2. UI/UX Design: Gained knowledge in creating intuitive and user-friendly interfaces.
3. Problem-Solving: Developed debugging and error-solving skills during app testing.
4. Collaboration: Worked as part of a team, improving communication and teamwork skills.
5. Industry Relevance: Acquired practical skills that align with current industry demands
9.0 Applications:
1. Provides real-time news updates.
2. Offers personalized content based on user preferences.
3. Useful for students and professionals to stay informed.
4. Helps journalists track trends and news.
5. Alerts users with push notifications for breaking news.
6. Accessible globally for a wide audience.
15
Teacher Evaluation Sheet for Micro Project
RubricsforAssessmentofMicro-Project
Poor Average Good(M Excellent
Characteristictobe
[Link]
Assessed (Marks1-3) (Marks 4-5) arks 6-8) (Marks 9-10)
1. Relevance to course
2. Literature survey
3. Project proposal
4. Completion of target
Analysis &
5.
representation of data
Quality of
6.
Prototype/Model
7. Report preparation
8. Presentation
9. Defense
Marks:-
Marks obtained Total
Marks for Group
Roll No. Name Of Student by the individual Marks
Work (06)
based on viva (04) (10)
33 Leena Dinesh Patil
Name and designation of Faculty Member_______________________________________
Signature: _________________________________________
16
Maharashtra State Board of Technical Education, Mumbai
CERTIFICATE
This is to certify that Mr /Ms Leena Dinesh Patil Roll No. 33 of 6th Semester of Diploma in
Information Technology of Mahavir Polytechnic has completed the Micro Project satisfactorily
in course MAD (22617)for the academic year 2024 -2025 as prescribed in the curriculum.
Place:-Nashik Enrolment No:-2205300167
Date _______________ Exam Seat No _____________________
Mr .O.V. Khute [Link] [Link]
Course Coordinator HOD Principal
Institute Seal
17