I just uploaded a new version of Telenet Hotspot Autologin in the Google Play Store.
The BIG change: Support for Telenet Homespots!
There are some minor layout-changes and general code-optimizations but nobody will probably notice
I just uploaded a new version of Telenet Hotspot Autologin in the Google Play Store.
The BIG change: Support for Telenet Homespots!
There are some minor layout-changes and general code-optimizations but nobody will probably notice
After a mad weekend of experimenting with OpenGL and the Sound API’s of android i got this demo-application that was just beyond the state of demo. So i decided to release it as it is. Maybe someone will find a creative use for it.
cjDrums: Basic drumpad app with a twist! Depending on where you hit the pad, the pitch will differ. You can load your own samples and save/load drumkits.
First a bit of background: I hooked up my TV to a linux-box running Ubuntu. As a mediaplayer i use XBMC which also has a nice Android app for remote control. Something i miss though, is an easy way to record audio while watching. I use a lot of movie-samples (voices, fx, drones) in my music and i’m always looking at easier ways to get a bunch of samples. But here comes Remote Launcher to the rescue!
This app lets you run custom commands and shellscripts with the click of a button on your phone.
Here’s how i did it:
(apt-get install sun-java6-bin sun-java6-jre)remote-launcher-server -d
Fill in a password twice. You only have to do this once. If you see a message that it’s running on port 4444. You’re set, and you can just CTRL-C again. The important thing is that you now will have a ~/.remotelauncherserver configuration file.
/etc/init.d/remotelauncher
#! /bin/sh
### BEGIN INIT INFO
# Provides: remotelauncher
# Required-Start: $local_fs $all
# Required-Stop:
# Default-Start: 2
# Default-Stop:
# Short-Description: Start the Android Remote Launcher daemon
# Description: See http://owtroid.com/remotelauncher/mediawiki/index.php?title=Remote_Launcher
### END INIT INFO
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
NAME=remote-launcher-server
DAEMON=/usr/bin/remote-launcher-server
[ -x "$DAEMON" ] || exit 0
case "$1" in
start)
echo "Starting remote-launcher-server"
start-stop-daemon --start --background --user YOUR_LINUX_USER_NAME --make-pidfile --pidfile /var/run/remote-launcher-server.pid --exec $DAEMON --chuid YOUR_LINUX_USER_NAME -- -d
;;
stop|restart|force-reload)
echo "Stopping remote-launcher-server"
start-stop-daemon --stop --pidfile /var/run/remote-launcher-server.pid
;;
*)
echo "Usage: $NAME {start|stop|restart|force-reload}" >&2
exit 3
;;
esac
chmod 755 remotelauncher; update-rc.d remotelauncher defaults 96 02
~/scripts/startrecord.sh
#!/bin/sh date=`date +"%Y-%m-%d-%k-%M-%S"` filename="/data/Recordings/rec_$date.wav" /usr/bin/rec "$filename"
~/scripts/stoprecord.sh
#!/bin/sh /usr/bin/killall -9 rec
chmod 755 ~/scripts/startrecord.sh ~/scripts/stoprecord.sh~/.remotelauncherserver and put the following code in there. Make sure to change the paths of the scripts to the correct paths!
######## Remote Launcher Server config file ######## # # Add entries in the following format: # Name # Description # Path # # Example: # Notepad # Launch the Notepad editor # c:\windows\system32\notepad.exe # # Visit http://sf.net/apps/mediawiki/remotelauncher/ # for more details and examples. # # Blank lines or lines beginning with # are ignored. XBMC Start XBMC media center /usr/bin/xbmc Kill XBMC Kill XBMC media center /usr/bin/killall xbmc Record Start recording /home/cjpa/scripts/startrecord.sh Stop Record Stop recording /home/cjpa/scripts/stoprecord.sh
/etc/init.d/remotelauncher start and we’re ready to control our computer from our android device
People who want to autologin on a Telenet Hotspot with their MacBook, here’s a recipe you can use for that.
By far the most reliable way to do this is using crankd that, in a very similar way to launchd, allows you to run scripts in response to events such as network changes, filesystem activity, and application launching. The process to get started is not terribly complicated, but it requires some editing of system files.
#!/bin/sh
tn_user=YOUR HOTSPOT LOGIN
tn_pass=YOUR HOTSPOT PASSWD
CURL=`which curl`
SSID=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'`
if [ "$SSID" = "TELENETHOTSPOT" ]; then
$CURL -v -L -d checkterms=1 -d terms=on -d c=std -d lang=nl -d userid=$tn_user -d password=$tn_pass "https://portal.telenethotspot.be/logon/welcome.jsp";
fi
/Users/cjpa/scripts/autologin_tnhotspot.sh/usr/local/sbin/crankd.py. If for some reason it crashes with an error about an undefined NSNotificationHandler, don’t worry. You can safely disregard that. If it didn’t crash type Ctrl+C to exit the program. The important point is that it would have created an example configuration file in:~/Library/Preferences/com.googlecode.pymacadmin.crankd.plist.<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SystemConfiguration</key>
<dict>
<key>State:/Network/Global/IPv4</key>
<dict>
<key>command</key>
<string>/Users/cjpa/scripts/autologin_tnhotspot.sh</string>
</dict>
</dict>
</dict>
</plist>
/usr/local/sbin/crankd.py in a terminal and disconnect your wireless. Reconnect again and check in the console if you get output like this: INFO: SystemConfiguration: State:/Network/Global/IPv4: executing /Users/cjpa/scripts/autologin_tnhotspot.sh ~/Library/LaunchAgents/org.crankd.plist and put the following in it:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>org.crankd.plist</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/sbin/crankd.py</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
launchctl load ~/Library/LaunchAgents/org.crankd.plistBased on the following blogpost: http://qscripts.blogspot.com/2011/03/run-script-in-os-x-on-network.html
Telenet Hotspot AutoLogin: Little app for customers of the Belgian ISP Telenet. If you have a Telenet Hotspot-account, this android-app will automatically log you in when in reach of a Telenet Hotspot. No need anymore to log in through the portal-website.
Copywaste Android App: The CopyWaste Android app.
Market link: https://market.android.com/details?id=com.cjware.copywaste
Android Love Vibrator: A naughty little app i made for android-phones to learn some tricks.