1

I have seen Pushbullet, but it works over the internet

3
  • Should be possible utilizing adb and the am command – but I've never tried it, so I'm not sure what intent to call for that.
    – Izzy
    Aug 19, 2016 at 11:58
  • @Izzy You'd need to make an app to receive the intent and create the notification (or find an existing one).
    – Dan Hulme
    Aug 19, 2016 at 12:46
  • 2
    Actually, I expect you could do this with Tasker. Use adb to send a "run task" event to Tasker, and make a "Notify" task in Tasker, reading the notification task out of the intent.
    – Dan Hulme
    Aug 19, 2016 at 12:47

3 Answers 3

1

You can use adb shell and Notify4Scripts

source: https://forum.xda-developers.com/showpost.php?p=69859668&postcount=18

date: 30th November 2016, 02:32 PM

Two years ago I was in need of a simple notification tool that could have been run by a command line in a script. So far the best I found was this thread and the tiny app made by corruptor64. That wasn't exactly what I was looking for so I finally decided to try to make the tool by myself. Starting from scratch (I am not an Android developer) in a few days of studying and developing I ended up with a working small app, that I named Notify4Scripts and I made it public only this past June, here on GitHub https://github.com/halnovemila/Notify4Scripts

Note that since the app is basically a service that has to be launched by the Android's shell "am" (activity manager) command, the Android system needs to be rooted first in order to be able to use such am command and have notify4scripts executed.

0

Try AirDroid3 ,I know you have specified this via USB but just in case you need to work with wireless setup.

Well with this you don't need USB cable to connect to your pc or mac. Airdroid3 on web as well as desktop client. Notification Mirror is a feature introduced in AirDroid v2.0.9. It allows you to view all the app and system notifications on your computer. WhatsApp, WeChat, Line, Facebook, Twitter... all user and system app notifications are supported:

How to enable Notification mirror??

  1. Go to Settings in AirDroid App>Notification Mirror>Notification Mirror Service: enter image description here
  2. Check the box next to AirDroid Notification mirror service and tap OK: enter image description here

3.Setting is done now. You can go back to AirDroid Settings and create a test notification to see if it works:

enter image description here

A notification will pop up at the bottom right corner (you need to sign in to web.airdroid.com first): You'll also receive a pop-up on your computer if you've signed in to AirDroid Windows/Mac: If the service is working perfectly, you will get a notification on your Android as well as on your desktop (if you have AirDroid open in one of your browser windows.) saying "Awesome. AirDroid notification mirror service is working". The third option is "Allowed Apps".You can choose the apps whose notifications you want to receive on your desktop. For example, you might not want to get email notifications on your desktop if you already have an email client running on your computer, or you might not want notifications from gaming applications. Note: To receive desktop notifications when you are not focusing on web.airdroid.com, you need to enable desktop notifications(and even choose the language in which you wish to be notified) on web.airdroid.com > Account > General: enter image description here

Well it not only gives text notification but also you can send and receive notification for phone call and you can reply back with text message if u cannot pick up call when you are busy working or your phone is not around .You can see this in the links provided..

For more information check following links:

Android3 brings android device mirroring, desktop clients and more...

Airdroid3-how to control android device..

Offical Site oF AirDroid

Other Apps you can give try :

  • IF you don't need to go for browser based services You can try DeskNotifier with this currently your phone and PC need to be connected to the same WiFi network or via USB cable.
  • AndroidNotifier works with WiFi and Bluetooth only,

Hope This Helps!!!

2
  • @Izzy I have edited my answer .Hope this clears your doubt . I know OP explicitly wanted to work via USB but just in case OP is looking for better options..other than USB cable...I have suggested other apps also which are not browser based..Thanks for your suggestion for improvement..
    – PN10
    Aug 19, 2016 at 20:41
  • Yupp, MUCH better. May I suggest a second check, to better meet the requirements? Wasn't there an option to use Airdroid via USB (or at least restrict it to the local WiFi)? I vaguely remember something like that. Currently, it explicitly contradicts the requirements: OP definitely doesn't want to use Internet fpr that, but your recommendation of Airdroid requires to configure things via "web.airdroid.com"?
    – Izzy
    Aug 19, 2016 at 21:18
0

You can use adb + Termux + Termux:API like this:

adb shell "export PREFIX='/data/data/com.termux/files/usr' ; export HOME='/data/data/com.termux/files/home' ; export LD_LIBRARY_PATH='/data/data/com.termux/files/usr/lib' ; export PATH="/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets" ; SHELL='/data/data/com.termux/files/usr/bin/bash'; cd $HOME ; /data/data/com.termux/files/usr/bin/bash termux-notification --sound --vibrate 500 -c 'test notification'"

source

TIP: I've wrapped the part of the command before "/usr/bin/bash" in a script, so i can easily launch similar Termux:API commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .