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

clear missed calls and clear notification from android bar
whole viewgroup to bitmap
Corona will generate native code?
Android GCM SSLException
there is any way to save my shared preferences data into sqlite database in android
Notification in android add two notification
Android: nine-patch is centered on one device, but moves somewhat to the right on another
Android: is it possible to remove a system-managed notification programmatically?
How to use saved instance state and restore instance state?
Creating and distributing jar files in Android
android - list adapter problems
android make a listview un-scrollable
android - how can I get time in sleep
Listening for Google Voice SMS
Chrome on Android pixel ratio off?
Android: Proximity alert updating latitude longitude

Categories

HOME
go
eslint
ng-idle
apache-flink
nunit
mstest
static-site
ado.net
fhir
gson
emoji
http-post
scsi
google-content-api
google-container-registry
mapstruct
production
replication
lilypond
microsoft-ocr
question2answer
epsilon
roundup
perlbrew
jboss6.x
linked-data
inversion-of-control
handler
wcag
mql
eviews
activexobject
pdw-file-browser
hackintosh
mcustomscrollbar
datacachefactory
branching-and-merging
bindingnavigator
android-checkbox
memory-mapping
user-defined-fields
x-ray
arules
baidu
rsa-archer-grc
atlas
watch-os-2
pre-build-event
refinerycms
omniauth-facebook
stream-processing
riot
hadoop-partitioning
libav
findfirst
thread-sleep
flock
cgi-bin
iced-coffeescript
wso2greg
j-security-check
broadband
spy++
formview
nsmenu
ora-00904
jjaql
tinyxml
draw2d-js
twitter-bootstrap-rails
ie8-compatibility-mode
inputmismatchexception
cffile
node-blade
css-reset
web-notifications
joomla3.1
tree-balancing
fragmenttransaction
dajaxice
virtualpathprovider
expression-blend-4
jquery-tools
fsevents
cgbitmapcontextcreate
nstokenfield
lalr
dsl-tools
sifr3
scrubyt
wysiwym
linfu-dynamicproxy
unmanagedresources
great-circle
pnrp

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