|
|
|
Android Write Resource
Android Source Code
Java program for surveillance using an Android smartphone. Webcam with FTP access to the photo storage.
Android Safety SYSTEM >>
The Rescue PHOTO application takes a photo and uploads it to your FTP server. In this case, the standard settings of the smartphone's photo module are used. All the parameters that you used before will be relevant while the application is running.
When the app takes a photo, it is written to the smartphone's standard photo folder. You can see it, for example, in the gallery.
Let's see how to record a photo taken using Java in Android
//==================================================================
// Recording a PHOTO file
//==================================================================
@Override
public void run() {
;Log.i(LOG_TAG, "==| ImageFileWrite |== - public void run()");
ByteBuffer buffer = mImage.getPlanes()[0].getBuffer();
byte[] bytes = new byte[buffer.remaining()];
buffer.get(bytes);
FileOutputStream output = null;
try {
output = new FileOutputStream(mFile);
output.write(bytes);
Log.i(TAG, "==| Write JPG - OK. FULL Path |==: " + mFile.toString()); // Full path /storage/emulated/0/DCIM/test1.jpg
} catch (IOException e) {
Log.i(TAG, "==| Error write JPG file |==");
e.printStackTrace();
} finally {
mImage.close();
if (null != output) {
try {
output.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Image.GetPlanes - Method - Get the array of pixel planes for this Image.
Android Handler
|
|
|
|
|
|
|
Application Rescue PHOTO has significant commercial potential. A huge number of old and damaged smartphones are sent to a distant box, landfill or recycling, without creating any cashback for you. Having zero cost, such smartphones can be used for photographic observation of objects via the Internet. Those. can be used to create low-cost commercial products. A company that creates such software can have positive dynamics in the market. Using the basic software product Rescue PHOTO in Java, you can create software for any needs of your customers.
Many useful functions can be added to the basic Java code based on additional agreements with clients. This allows you to monetize the free Rescue PHOTO remote surveillance app.
|
|
|
|