Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,808,000 Members 49,025 Now Online
XDA Developers Android and Mobile Development Forum

CLI Screenshot app [Notify-OSD support]

Tip us?
 
blmvxer
Old
(Last edited by blmvxer; 31st July 2013 at 11:31 PM.) Reason: Update
#1  
blmvxer's Avatar
Senior Member - OP
Thanks Meter 547
Posts: 1,292
Join Date: Jan 2012

 
DONATE TO ME
Smile CLI Screenshot app [Notify-OSD support]

This will take a screenshot and save it to /home/phablet/Pictures

When exectued it'll ask how many seconds you want to wait. you choose x amount of seconds, push enter and navigate to where you want the screenshot to be taken.
it'll notify you when the screenshot is finished via the native notification service

Code:
#!/bin/bash
echo "ScreenShot App for Ubuntu Touch"
echo ""
echo ""
echo "How many seconds do you want to wait before the screenshot is captured? "
read SEC
sleep $SEC
NOW=$(date)
SCREEN="screenshot-$NOW.png"
/system/bin/screencap -p /home/phablet/Pictures/"$SCREEN"
notify-send "Screenshot Captured" "Saved in /home/phablet/Pictures"
INSTRUCTIONS!!!
save the file as screenshot
push to /usr/bin/
chmod 755 /usr/bin/screenshot
run screenshot
enjoy.
DogeCoin Wallet
DTytjVUcEBpUTG1JPSHvfouqhAUt2YD9iK

Developer For:Uncapped ROM
HTC Evo Shift and HP Touchpad

Current OS's
Ubuntu 14.10
Linux Deepin 2013
Android 4.4.3
OpenBSD

What OS's I program for
Android
Ubuntu and Ubuntu Touch
WebOS
The Following 2 Users Say Thank You to blmvxer For This Useful Post: [ Click to Expand ]
 
blmvxer
Old
#2  
blmvxer's Avatar
Senior Member - OP
Thanks Meter 547
Posts: 1,292
Join Date: Jan 2012

 
DONATE TO ME
I'm going to implement this into QML if I can find a way to pass shell commands or maybe just run the shell script and then render the image on the app canvas.

Sent from my Galaxy Nexus using XDA Premium 4 mobile app
DogeCoin Wallet
DTytjVUcEBpUTG1JPSHvfouqhAUt2YD9iK

Developer For:Uncapped ROM
HTC Evo Shift and HP Touchpad

Current OS's
Ubuntu 14.10
Linux Deepin 2013
Android 4.4.3
OpenBSD

What OS's I program for
Android
Ubuntu and Ubuntu Touch
WebOS
 
nikwen
Old
#3  
nikwen's Avatar
Recognized Contributor
Thanks Meter 1,331
Posts: 2,713
Join Date: Feb 2013
Quote:
Originally Posted by blmvxer View Post
I'm going to implement this into QML if I can find a way to pass shell commands or maybe just run the shell script and then render the image on the app canvas.

Sent from my Galaxy Nexus using XDA Premium 4 mobile app
You can run shell commands using a C++ plugin but it won't work properly with click packages. You'll need to use the unconfined template in your apparmor *.json file and apps which are run without confinement won't be included in the app store.
However, I guess that they will add a way to take screenshots to the OS itself later.
 
yashade2001
Old
#4  
yashade2001's Avatar
Senior Member
Thanks Meter 564
Posts: 564
Join Date: Sep 2012
Location: Ankara

 
DONATE TO ME
how to install notify-send ?
AOSPAL Member

Add Me To Your Circles On Google+: plus.google.com/u/0/102336505893640042592
My GitHub: github.com/yashade2001
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes