Machine Learning capability ideation in a mobile device

Milind Kulkarni
3 min readJun 14, 2023

--

Introduction

Nowadays, machine learning (ML) has gained a lot of traction. The companies are looking forward to introduce ML capabilities in their existing or future service(s) and product(s). This article is an attempt of an ideation of ML capability for notification services of different application installed in a mobile device like smartphone.

As we all know, we have multiple applications available on various smartphones supporting Android and iOS systems. Many of these applications have a notification service to indicate some kind of event or message received on that application. For e.g. email received message, whatsApp message, bank message. The notification serves as an attention seeking activity for a smartphone user. When user is active (day) during normal working hours these notifications serve their purpose in well manner. However, when user is inactive (night) especially during late night, odd hours; these notifications may cause some kind of nuisance to the user and the surroundings. This article provides an ideation to avoid such notification using ML technique. This idea can be classified as unsupervised learning.

Ideation

To use ML capabilities, we can introduce a module NotificationMLModule in a native language that is used to build mobile application e.g. Kotlin for Android, Swift for iOS etc. We need to introduce a class or struct to hold key ML data members.

class NoticationMLData {
TimeData[] timeData;
ScreenActive active;

void muteNotification() {
//...
}
}

class TimeData {
Date startDate;
Date endDate;
Time startTime;
Time endTime;
int duration;
}

The ScreenActive can be equivalent of native object to indicate screen is active or not for any user activity. The NotificationMLModule should be able to derive which installed applications have notification capabilities. This module can be listed under ML dashboard in a smartphone.

We need to take help of below sources

  • Native thread to monitor, populate below class members.
  • The ScreenActive like an equivalent native object to indicate screen is active or not for any user activity.
  • An OS call to mute notifications.

Algorithm

The algorithm written in NotificationMLModule can be as follows:

1) Start a thread for NotificationMLModule

A) Build mute notification ML pattern
Create a new object of NoticationMLData
when screen is inactive note startDate, startTime
when screen is active note endDate, endTime
check if duration = endTime - startTime (time difference for same date)
save it in timeData[]
sort timeData[] by date and duration in descending order
find max duration for consecutive 5 days to set a pattern of startTime
and endTime between which the all the notifications can be muted

B) Tear mute notification ML pattern
if screen is active during startTime and endTime
since mute notification ML pattern is set
Create a new object of NoticationMLData
when screen is active note startDate, startTime
when screen is inactive note endDate, endTime
check if duration = endTime - startTime (time difference for same date)
save it in timeData[]
sort timeData[] by date and duration in descending order
if found such pattern for consecutive 5 days, clear the data built in A and
clear data built in B. No ML exists at this point of time.
Thread should start processing step A.

else
continue with mute notification ML pattern


Please note the duration of 5 days in A and B should be configurable.

Explanation

  • Start a thread to monitor and gather required data to build mute notification ML pattern.
  • Build a pattern of time when user is not doing any activity on the smartphone.
  • Unmute notification from startTime and endTime pattern for each day.
  • Tear the built mute notification ML pattern, if phone is active between similar time duration since mute notification pattern is been set.
  • After tearing the ML pattern, thread has to monitor and gather required data to build mute notification ML pattern again.

Conclusion

In this article, we visited an idea to introduce mute notification ML pattern in a mobile device like smartphone. We can extend the idea to make life easier and better by adding a machine learning dimension to existing or future service(s) and product(s).

Thanks for reading my article.

--

--

Milind Kulkarni
Milind Kulkarni

Written by Milind Kulkarni

Software developer- Java/J2EE, middleware. Prior experience with pointer based language. https://www.linkedin.com/in/milind-kulkarni-416b1213b

No responses yet