android


Programmatically how to create Video in android


I want to create an application that will enable to record screen behavior as a video that will be save programmatically on the device. Can any one help me for this ?
Fortunately, this is not possible, except perhaps on rooted devices, for obvious privacy and security reasons. An app cannot record what other apps show on the screen.
For a rooted device you can take screenshots and make a video based on those screenshots using FFMPEG or JavaCV.
Actually this topic have been discussed several times.
Here's an example of How to get root access and get your screenshot.
if (Environment.MEDIA_MOUNTED.equals(Environment
.getExternalStorageState())) {
// we check if external storage is\ available, otherwise
// display an error message to the user using Toast Message
File sdCard = Environment.getExternalStorageDirectory();
File directory = new File(sdCard.getAbsolutePath() + "/ScreenShots");
directory.mkdirs();
String filename = "screenshot_jpeg_" + i + ".png";
File yourFile = new File(directory, filename);
try {
Process sh = Runtime.getRuntime().exec("su", null, null);
OutputStream os = sh.getOutputStream();
os.write(("/system/bin/screencap -p " + "/sdcard/ScreenShots/" + filename).getBytes("ASCII"));
os.flush();
os.close();
sh.waitFor();
i++;
} catch (Exception e) {
e.printStackTrace();
}
}
You can check other solutions on the following topic and here for FFMPEG

Related Links

Link build.gradle file with android project
dose not get header info at server. i used retrofit 1.9.0 and the method for putting header is
Chrome mobile, Navigation is blocked when redirecting to SMS
Pass position in ListView to child RecyclerView Adapter
New project MainActivity Errors
How to Refresh Android Listview with new value only
Android in app billing error Class not found when unmarshalling
Buttons inside fragments tabs
POST body for sending a new messages with the Microsoft BotConnector
Google Map V2 Android and iOS place latlng decimal places
android running service starts app autmatically
Does deprecated methods are executed by the lastest API?
How to Hide / disable Power Button Options on Key Long Press
How does Samsung Note achieve the process of having two apps open at the same time?
Firebase Cloud Messaging onMessageReceived not getting triggered
How to handle notification when app in background in Firebase

Categories

HOME
oracle12c
checkstyle
ng-idle
pascal
battery
sh
edge
spring-data-mongodb
scripting
cq5
visual-studio-emulator
limit
ado.net
bookmarks
appcelerator-studio
text-mining
renjin
eip
alpacajs
dynamic-sql
feathersjs
google-data-studio
video-editing
cfml
backpack-for-laravel
ios10.2
direct3d11
windows-server-2003
onload
inversion-of-control
errbot
comparable
user-defined-functions
sqsh
anki
kudu
laravel-eloquent
pdw-file-browser
yowsup
openproject
wurfl
zoomify
diacritics
magento-1.9.3
dcmtk
install.packages
flask-restful
fwrite
user-defined-fields
launchctl
rserve
corruption
semantic-logging
java-bytecode-asm
angular2-testing
meteor-packages
pacemaker
neon
windows-azure-queues
jquery-jscrollpane
nss
ellucian-scribe
libav
findfirst
jaunt-api
ascii-art
rasterize
toran-proxy
java-money
forwarding
snoop
typeconverter
execve
crowd
teaspoon
personalization
wxformbuilder
vsx
android-usb
spring-3
artemis
ebay-lms
printdialog
android-sdk-2.3
redis-py
nokia-s40
jquery-blockui
subgraph
garbage
azman
dataform
http-daemon
cdonts
instantiationexception
hbm2java
openfaces
nstokenfield
duplex
echo3
windows-identity
firefox-3
unmanagedresources
wcf-proxy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App