3

Is there maybe an easy way to have my Visual Studio/Eclipse/IntelliJ "Build Successful" console output trigger a push notification to my Android phone?

Sometimes it fails in less than a minute, sometimes it requires around 15 minutes to build everything, so I'd be pretty relaxed to know I can rely on a notification instead of checking every now and again.

Thanks in advance

  • Maybe an extension. I might be able to program one and you can if you know C# – Suici Doga Feb 10 '16 at 13:11
  • @SuiciDoga thanks for your comment, it helped me realize that I would also need this for more IDEs, like Eclipse and IntelliJ. Edited question. I am working in Eclipse and I use some C++ code via JNI in Visual Studio too, and currently transitioning from Eclipse to IntelliJ. Cheers – user85190 Feb 10 '16 at 13:14
  • @SuiciDoga heard that one could use an OCR app that reads the screen (and hence can be adapted to receive a certain piece of text) I wonder if one exists, that I'd be able to trust installing on my PC. Maybe there are some open-source versions of that? – user85190 Feb 10 '16 at 13:17
  • 1
    @usee85190 Best is to learn some programming💻 – Suici Doga Feb 10 '16 at 13:17
  • I think ide extension is a more simple way – Suici Doga Feb 10 '16 at 13:18
1

I would even say you could use VNC (I would use it via an SSH tunnel or VPN don't just expose VNC port to the world it's VERY unsafe if you do not (see port forwarding over ssh tunnel for easiest way to secure such a connection).

Anywho this would allow you to view your progress, and then you could even run a couple extra commands (if comfortable with the terminal and command line you could even just use SSH server alone and when connect you could always bring up a background job (I recommend JuiceSSH).

As for exactly what you are asking it would seem to me if you say wrote a quick shell script that calls your command and when done also edits a simple text file. Then anything that can connect and check for text file contents (say write a shell script for your android (see: https://play.google.com/store/apps/details?id=os.tools.scriptmanager&hl=en)). You could say setup a samba share for the directory where you store the text file then setup a quick script to wget the text file and print whatever on your screen.

All in all I would say from the sounds of a developer angle you may prefer to setup openssh server, then install x11vnc, setup a script (I use xUbuntu (XFCE4 and not unity) and a simple upstart script to start VNC on system start and anytime I issue sudo service vnc restart. Once you have the SSH and VNC server command running you can then use any ssh client (again can't say enough about Juice SSH it does port forwarding in a snap). Once setup, for me I tap on icon on my home screen to connect the port (auto passes my user/cert and all), and then I open Jump Desktop and tap the entry for my server and it auto passes my VNC password so I only have 2 taps and I am in with full security. If needed NoIP.me still does free Dynamic DNS so you can get an account and then use an address that never changes (ie. user.noip.me) instead of having to memorize your home routers WAN IP and remember to check every time it changes.

Sorry if this sounds a little long winded. I am unaware of your tech expertise level, and I wanted to not only try to specifically answer your question as posed, but also share my personal solution as this would allow you access from anywhere (unless using a Wi-Fi that filters your SSH server port or if you have no data connection), AND not only see if the work is done, BUT you can also interact with your desktop as if you were sitting in front of it and fix any maybe small compile issues or make that adjustment before you forget type of stuff. I use Jump Desktop a TON and it is fully capable (even handles M$ Remote Desktop as well).

Please let me know if you need me to explain anything, or adjust it if you are using Windows (I use xUbuntu 14.04 currently which is FREE, and desktop mimics Windows somewhat closely so if you are a Windows Dev and would like to try out Linux I recommend it HIGHLY)).

Anywho, hope this info helps.

  • Wow, thanks Mike for the answer! Indeed I am developing on a Windows machine – user85190 Sep 12 '16 at 18:49
  • Well then you can still have a setup with an SSH Server and VNC. You would however download something like UltraVNC and run that as a Windows service (CHANGE THE DEFAULT PORT) (Free), and then install OpenSSH Server (Free) (again change default port). You would port forward the SSH port and not the VNC then forward VNC through the SSH connection. SSH: mls-software.com/opensshd.html UltraVNC (server and viewer): uvnc.com/install/installation.html – Mike Sep 13 '16 at 11:37
1

This can be done in two ways:

Application Suggestion

There are applications that will show a notification on your computer from your phone, for example, Pushbullet and Desktop Notification from hciLab

To obtain a notification, you may use an Antivirus or Cleaning/Maintanence Applications which gives a notification about scanning the app once it is installed.

Configuring Pushbullet on your PC along with the device you are testing it on will give you a notification every time when the build completes and application is installed.

Programmatic Solution

A script can be written to read either the ADB Console or ADB log. The Script should look for "Build Successful" or similar string.

I will try to write a script to do just that. Maybe try the Application way till then. If anyone goes on to write a script for that, feel free to edit the answer.

  • Thanks for your answer! Does Pushbullet work the other way around: from pc to mobile? – user85190 Sep 12 '16 at 14:24
  • I haven't really used such an arrangement, can't say. As a suggestion, maybe try using TeamViewer on mobile device, but again, it'll be tacky. – shashankj Sep 13 '16 at 2:47
1

I think I have found what you would like. Eclipse plugin named Jenkins. Looks exactly like what you are talking about. It can monitor jobs (and even let you fully interact with it through your browser. Took me awhile to find this as Eclipse and a lot of terms start bringing up code examples for projects and what not, but hey persistence!!

Software that should do what you would like: https://wiki.jenkins-ci.org/display/JENKINS/Use+Jenkins

Good looking guide on integrating it with Eclipse: https://www.3pillarglobal.com/insights/how-to-set-up-continuous-integration-with-eclipse-selenium-webdriver-maven-and-hudson

"What is Jenkins? Jenkins is an award-winning, cross-platform, continuous integration and continuous delivery application that increases your productivity. Use Jenkins to build and test your software projects continuously making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. It also allows you to continuously deliver your software by providing powerful ways to define your build pipelines and integrating with a large number of testing and deployment technologies.

Features Jenkins offers the following major features out of the box, and many more can be added through plugins:

Easy installation: Just run java -jar jenkins.war, deploy it in a servlet container. No additional install, no database. Prefer an installer or native package? We have those as well. Easy configuration: Jenkins can be configured entirely from its friendly web GUI with extensive on-the-fly error checks and inline help. Rich plugin ecosystem: Jenkins integrates with virtually every SCM or build tool that exists. View plugins. Extensibly: Most parts of Jenkins can be extended and modified, and it's easy to create new Jenkins plugins. This allows you to customize Jenkins to your needs. Distributed builds: Jenkins can distribute build/test loads to multiple computers with different operating systems. Building software for OS X, Linux, and Windows? No problem."

Now of course you do not have to go crazy and use every piece of what is offered here, but man this looks like an awesome programming utility if I ever saw one.

  • Of course you will want to use a Dynamic DNS service so you can just type my.computer.hello:8080 into your browser window (be it a desktop or mobile device this should work by the looks of things (and they even have a test link you can use to download a quick test version to look at). – Mike Sep 13 '16 at 16:06
  • Oh I just realized looking through things (Jenkins aka Hudson (old name)) is a standalone server then you install a plugin to communicate with the server. This looks like a very good guide on this: 3pillarglobal.com/insights/… – Mike Sep 13 '16 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.