Auto Upload Android Camera Photo to Ftp

  1. Features
    - upload final movie taken with camera to FTP
    - take pictures every 10 secs
    - set name of flick on the ftp side with selection to supersede the electric current picture or add a number to the file proper name

    I plan on using it to upload the terminal flick taken with my camera to a blog or website. I had an app on my WM phone before switching.



    1. Download the Forums for Android™ app!


      Download

  2. Ajes

    yes please please make this app!

    or does anyone know an exitsting app that does this?

  3. Ajes


    only demand one thing more..:

    an app that car accept a picture every xxx sec, or like?

  4. ollyhicks

    Did you find annihilation? Might have a go and meet if I could brand such an app
  5. eurobears

    Hi,
    I am working on that project,
    It works ...1 shot, then it crash.
    I have created ii activities, I m using alarmManager.setRepeating to repeat the photographic camera thread.
    If you take time to assistance, here is my lawmaking::thinking:
    Manifest with ii action
    1. <?xml version="i.0" encoding="utf-8"?>
    2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    3.       android:versionName="one.0">
    4.     <application android:icon="@drawable/icon" android:label="@cord/app_name">
    5.         <activity android:proper name=".FtpCam"
    6.                   android:characterization="@string/app_name">
    7.                 <action android:name="android.intent.activeness.MAIN" />
    8.                 <category android:name="android.intent.category.LAUNCHER" />
    9.         </activity>:confused::confused:
    10.         <activity android:name=".AndroidCamera" android:label="@string/app_name">
    11.         <service android:name=".MyAlarmService" />
    12.     <uses-sdk android:minSdkVersion="4" />
    13.     <uses-permission android:proper name="android.permission.FTP" />
    14.     <uses-permission android:name="android.permission.WIFI" />
    15.     <uses-permission android:name="android.permission.Camera" />
    16.     <uses-permission android:name="android.permision.WRITE_EXTERNAL_STORAGE" />
    The main
    1. import java.util.Calendar;
    2. import android.app.Activeness;
    3. import android.app.AlarmManager;
    4. import android.app.PendingIntent;
    5. import android.content.Intent;
    6. import android.os.Bundle;
    7. import android.view.View;
    8. import android.widget.Button;
    9. import android.widget.Toast;
    10. public class FtpCam extends Activity {
    11. private PendingIntent pendingIntent;
    12.  /** Called when the activeness is first created. */
    13.  public void onCreate(Package savedInstanceState) {
    14.      super.onCreate(savedInstanceState);
    15.      Intent myIntent = new Intent(FtpCam.this, AndroidCamera.class);
    16.      :confused::confused:pendingIntent = PendingIntent.getActivity(FtpCam.this, 0, myIntent, 0);
    17.      AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
    18.      Agenda calendar = Calendar.getInstance();
    19.      calendar.setTimeInMillis(System.currentTimeMillis());
    20.      calendar.add(Calendar.2d, 5);
    21.      alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, calendar.getTimeInMillis(), 20*1000, pendingIntent);}}
    The photographic camera
    1. import coffee.io.FileNotFoundException;
    2. import java.io.IOException;
    3. import java.io.OutputStream;
    4. import android.app.Action;
    5. import android.content.ContentValues;
    6. import android.content.pm.ActivityInfo;
    7. import android.graphics.Bitmap;
    8. import android.graphics.BitmapFactory;
    9. import android.graphics.PixelFormat;
    10. import android.hardware.Photographic camera;
    11. import android.hardware.Camera.AutoFocusCallback;
    12. import android.hardware.Camera.PictureCallback;
    13. import android.os.Parcel;
    14. import android.provider.MediaStore.Images.Media;
    15. import android.view.SurfaceHolder;
    16. import android.view.SurfaceView;
    17. import android.widget.Toast;
    18. public course AndroidCamera extends Action implements SurfaceHolder.Callback{
    19. SurfaceHolder surfaceHolder;
    20. boolean previewing = simulated;;
    21.   /** Called when the activeness is offset created. */
    22.   public void onCreate(Packet savedInstanceState) {
    23.       super.onCreate(savedInstanceState);
    24.       setContentView(R.layout.principal); //on utilise le xml principal
    25.       setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
    26.       getWindow().setFormat(PixelFormat.UNKNOWN);
    27.       surfaceView = (SurfaceView)findViewById(R.id.camerapreview); //la zone dans le xml
    28.       surfaceHolder = surfaceView.getHolder();
    29.       surfaceHolder.addCallback(this);
    30.       surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    31. // ici les differentes callback :
    32.   AutoFocusCallback myAutoFocusCallback = new AutoFocusCallback(){
    33.       public void onAutoFocus(boolean arg0, Camera arg1) {
    34.        //take photo larque la photograph est OK
    35.        camera.takePicture(null, naught, myPictureCallback_JPG);
    36.        //camera.takePicture(null, null, null);
    37.   PictureCallback myPictureCallback_JPG = new PictureCallback(){
    38.     public void onPictureTaken(byte[] arg0, Camera arg1) {
    39.       // TODO Auto-generated method stub
    40.       Uri uriTarget = getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, new ContentValues());
    41.       OutputStream imageFileOS;
    42.        imageFileOS = getContentResolver().openOutputStream(uriTarget);
    43.        /*Toast.makeText(AndroidCamera.this,
    44.          "Image saved: " + uriTarget.toString(),
    45.          Toast.LENGTH_LONG).prove();*/
    46.       } catch (FileNotFoundException e) {
    47.        // TODO Machine-generated take hold of cake
    48.       } catch (IOException e) {
    49.        // TODO Motorcar-generated grab block
    50. public void surfaceChanged(SurfaceHolder holder, int format, int width,
    51. // TODO Automobile-generated method stub
    52.   photographic camera.setPreviewDisplay(surfaceHolder);
    53.   //Autofocus, la photograph est prise dans la callback, qui indique que l epitome est nette
    54.   photographic camera.autoFocus(myAutoFocusCallback);
    55.  } grab (IOException e) {
    56.   // TODO Auto-generated grab block
    57. public void surfaceCreated(SurfaceHolder holder) {
    58. // TODO Auto-generated method stub
    59. // Mise en interruption de l'awarding
    60. public void surfaceDestroyed(SurfaceHolder holder) {
    61. // TODO Automobile-generated method stub
    62. Toast.makeText(this, "MyAlarmService.onDestroy()", Toast.LENGTH_LONG).prove();
  6. eurobears

    hither is my beginning project
    the webcam wifi android is working on my sony x10 mini (2.1)

    the beta v1 apk is available hither !

    Solar Android Webcam

  7. krikit

    Foldersync works pretty well. The photos taken on our phones are auto named by date and time, so I oasis't needed that feature. If the choice isn't there, there may exist a dissever app for such auto renaming.

    Also, you may only demand the low-cal version of Foldersync. Hope that helps! :D

Share This Page

smithantur1990.blogspot.com

Source: https://androidforums.com/threads/auto-upload-of-pictures-to-ftp.26190/

0 Response to "Auto Upload Android Camera Photo to Ftp"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel