Build an Impractical But Awesome Lego Mindstorm Dock

The vast majority of what we cover here on the XDA-Developers News Portal relates to … more

MultiROM Makes its Way Over to the HTC One (M8)

While browsing our forum, you will undoubtedly find more than a few enticing ROMs available … more

Welcome to the New XDA-Developers Portal!

You may recall that a few weeks ago, we opened up the XDA-2015 forum themesto intrepid users … more

An Android Enthusiast’s Apple iPhone 6 Challenge

The media has gone batty again over Apple “revolutionizing” smartphones. … more
Post Reply
Smile

CLI Screenshot app [Notify-OSD support]

30th July 2013, 04:25 PM   |  #1  
blmvxer's Avatar
OP Senior Member
Thanks Meter: 548
 
1,295 posts
Join Date:Joined: Jan 2012
Donate to Me
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.
Last edited by blmvxer; 31st July 2013 at 11:31 PM. Reason: Update
The Following 2 Users Say Thank You to blmvxer For This Useful Post: [ View ]
19th May 2014, 04:54 PM   |  #2  
blmvxer's Avatar
OP Senior Member
Thanks Meter: 548
 
1,295 posts
Join Date:Joined: 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
19th May 2014, 05:39 PM   |  #3  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,349
 
2,729 posts
Join Date:Joined: Feb 2013
More
Quote:
Originally Posted by blmvxer

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.
19th August 2014, 08:00 PM   |  #4  
yashade2001's Avatar
Senior Member
Flag Ankara
Thanks Meter: 628
 
595 posts
Join Date:Joined: Sep 2012
Donate to Me
More
how to install notify-send ?
21st September 2014, 05:28 AM   |  #5  
blmvxer's Avatar
OP Senior Member
Thanks Meter: 548
 
1,295 posts
Join Date:Joined: Jan 2012
Donate to Me
Getting back on this app soon. Hopefully I can do some binary work. I've been dabbling with C and C++.

Sent from my LGLS990 using XDA Free mobile app
23rd September 2014, 05:12 PM   |  #6  
nikwen's Avatar
Recognized Contributor
Thanks Meter: 1,349
 
2,729 posts
Join Date:Joined: Feb 2013
More
Iust wanted to inform you that this feature will soon be included into the system images, so you may want to save the time for packaging up your cli tool.
https://bugs.launchpad.net/ubuntu/+s...8/+bug/1369644

Sent from my awesome Ubuntu Touch device using the Forum Browser app
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools
Display Modes