Author Topic: Android notifications  (Read 455 times)

0 Members and 1 Guest are viewing this topic.

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 7108
  • Country: va
Android notifications
« on: July 27, 2023, 07:14:36 pm »
If there is a more appropriate forum to ask this, please point me at it.

I want to write a phone app to intercept Android notifications and send selected ones to a device over Bluetooth. The device may respond with a cancel command, and the app should then acknowledge the notification to a) stop it notifying, and b) allow subsequent notifications. If this sounds very much like the way a watch moght work, that would be an excellent example of functionality (although it isn't a watch, and only notifications are required - no voice, dialling, gps, etc). And it doesn't want to be a 'wear' app - just hit Bluetooth as directly as possible.

There is a snag: I know nothing whatsoever about Android programming, so my query is how should I go about achieving the app? I am happy to use an existing one, but I doubt one exists and I will need to do my own thing. Where to start, and which route to take?
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3500
  • Country: it
Re: Android notifications
« Reply #1 on: July 30, 2023, 05:30:34 am »
Probably not going to be easy, but i believe it's possible.

I see that Android has a "Notification Listener" component, but i don't undertand if it can get all notifications, or only those posted by your application
If you have no experience i suggest you use one of those frameworks to build app, they remove a lot of the complexity in getting started, building layouts and entering into the mindset of the maniacs that created the official tools. Poor souls.

Plus, for anything that is not this platform specific you get multiplatform support.
Plus, they don't radically change every couple of years, when the maniacs that mantains the official tools change. Seriously, if you find a tutorial or course make sure it's from the previous two years or newer, or you won't be able to follow with the current tools.

The framework that i use is called "Basic 4 Android", it is really easy to get started, there are a lot of official libraries (unlike flutter which a few months ago still relied on "the community" for most libraries and libraries support, most libraries were junk. I tried five different BLE and each had problems that made it useless). The community is one of the best i've ever seen, the power users there are really knowledgeable and willing to help, and 99% of the time the first one to answer is going to be the creator of the project with just the words you were looking for. The documentation is always up to date.

What i suggest is that you pick one of these frameworks, and go by steps. Open one example project (a tutorial from the forum) and see how it's built. Start with your own application to get used to building the layout and making things work. Add the BLE component and connect to the BLE device and interact with it. Add the notification listener library/component and play with it, see how to change other applications notification settings (that's going to be the hardest part. I believe it's possible though)
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 7108
  • Country: va
Re: Android notifications
« Reply #2 on: July 30, 2023, 09:07:40 am »
Quote
Probably not going to be easy

Yeah, I think that might be an understatement  :)

Quote
The framework that i use is called "Basic 4 Android"

Ah! I think I purchased that many, many years ago when it was being offered cheap. Had great plans and then did something else, as you do. I'll dig that out and see how it goes.

Thanks for your suggestions  :-+
 

Offline Shonky

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: au
Re: Android notifications
« Reply #3 on: July 30, 2023, 09:25:47 am »
There are a number of apps that "repeat" Android notifications to other devices so what you're suggesting is quite feasible. I can't help with the mechanisms for doing that but look at apps like Pushbullet and Join. They also allow responding to the notification remotely similar to what you suggest.
 

Offline PlainNameTopic starter

  • Super Contributor
  • ***
  • Posts: 7108
  • Country: va
Re: Android notifications
« Reply #4 on: July 30, 2023, 09:33:29 am »
Pushbullet is a new one on me, but my watch and satnav do this too and make a jolly good job of it. Seems to be getting quite common!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf