Android-Hidden Users for Specific Account

Jonathan Chrisnaldy
Gravel Product & Tech
3 min readAug 14, 2023

--

Photo by Nasa on Unsplash

About SalamChat

SalamChat is an instant messaging app the Gravel Technologies team developed that supports Gravel businesses. SalamChat was initially used by the project owner to chat about the project’s operation with the Construction worker(Gravel partner called Dulur). The purpose of SalamChat is to maintain privacy between the Project owner and the Dulur, so after the project is finished, both parties can’t talk to each other. On SalamChat app, users can:

  • Set their privacy settings
  • Manage their group chat
  • Add their friends with SalamChat ID without knowing their phone number.

It’s developed and tailored to Indonesian users, and the most important thing is all the chat data is on Indonesian soil.

Problem

In Q3 2023, the company decided to bring the SalamChat not only to support Gravel’s business but to introduce to Indonesia as a reliable and secure instant messaging app. As part of the marketing plan, the marketing team proposed an idea to campaign about a mental health issue. Hence, Gravel has an Official Account called “Kakak Salam,” where users can share their life problems, including their love, life, career problems(Curhat) on the SalamChat app. Not only Kakak Salam, but Gravel also has another Official Account as part of communication between Users and the Company, including the Sinta Official Account for Dulur to discuss job related, Gravel Material Official Account for users when they want to buy material for their project, etc. The problem is Dulur chat through Kakak Salam Official Account to ask for jobs, where they should ask the Sinta Official Account. It makes Kakak Salam chat full of Dulur requests, where Kakak Salam should handle Curhat from the users.

Ref: Insipirationfeed.com

Initiative

To handle that issue, Product & Engineering team came up with an idea to hide and disable chat between dulur and Kakak Salam’s Official Accounts. By disabling chat Kakak Salam with Dulur, it will help Kakak Salam to respond quickly to users and support the marketing team initiative for SalamChat to be a platform for users to Curhat. In the middle of development, the engineer came up with an idea to scale up this feature, not only to disable the chat between Kakak Salam and Dulur but it can be used to disable the chat between dulur and another Official Account. In short, the engineers create reusable APIs that can be used whenever we want to disable chat dulur with another Official Account.

The special accounts (Kakak Salam) are fetched from the backend response, so they can be dynamically changed through the backend in list, the backend can know the requested user using their tokens.

Here’s example of the response

"data": {
"hidden_users": [1234]
}

The object list hidden_users are the accounts that will be removed from dulur. All the access (contact, chat) from dulur to reach kakak salam will be removed.

By checking the hidden list users, this function will remove technically from the android side, and update to the backend for the removed users.

hiddenUsers?.let { users ->
val hiddenUsers = users
val isUserHidden = hiddenUsers.find { it == idUser }
if (isUserHidden != null) setUserIsHidden()
}

Conclusion

The engineer can also create mock responses using the growthbook feature for the next improvement. If another specified user wants to be hidden and the results are okay, the growthbook setup can be moved to the backend.

Ready to dive into seamless conversations? Elevate your messaging experience now! Download SalamChat and embrace a world of connected possibilities. Your conversations, your way — all within SalamChat’s welcoming embrace.

Reference: https://salamchat.id

Author:

--

--