Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to video streaming using a UVC DEVICE + Translation to Brazilian Portuguese (PT-BR) #1678

Merged
merged 17 commits into from Dec 14, 2015
Merged
3 changes: 2 additions & 1 deletion Android/AndroidManifest.xml
Expand Up @@ -56,7 +56,7 @@
<!-- You must insert your own Google Maps for Android API v2 key in here. -->
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyCN2XBLjIAD7NzTZJDN7BrHanE08PGL5eE"/>
android:value="AIzaSyBQiDpYcbIXcftKCu3zZe2sVqLI1C45dA4"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
Expand All @@ -81,6 +81,7 @@

<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

</activity>
<activity
android:name=".activities.EditorActivity"
Expand Down
5 changes: 5 additions & 0 deletions Android/build.gradle
Expand Up @@ -28,6 +28,7 @@ dependencies {

compile 'me.grantland:autofittextview:0.2.1'
compile(name:'shimmer-android-release', ext:'aar')
compile(name:'libuvccamera-release', ext:'aar')

compile files('libs/droneapi-java-0.3-SNAPSHOT.jar')
compile files('libs/protobuf-java-2.5.0.jar')
Expand Down Expand Up @@ -75,6 +76,10 @@ android {
buildConfigField "boolean", "WRITE_LOG_FILE", "true"
buildConfigField "int", "LOG_FILE_LEVEL", "$logLevelDebug"
buildConfigField "boolean", "ENABLE_CRASHLYTICS", "false"

// Enabling multidex support.
multiDexEnabled true

}

compileOptions {
Expand Down
Binary file added Android/libs/libuvccamera-release.aar
Binary file not shown.
31 changes: 31 additions & 0 deletions Android/res/layout/dialog_uvc_device.xml
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/dialog_uvc_vertical_margin"
android:paddingLeft="@dimen/dialog_uvc_horizontal_margin"
android:paddingRight="@dimen/dialog_uvc_horizontal_margin"
android:paddingTop="@dimen/dialog_uvc_vertical_margin"
tools:context="org.droidplanner.android.dialogs.UVCDialog" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/uvc_device" />

<Spinner
android:id="@+id/spinner1"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
android:id="@id/android:empty"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/uvc_device_no_device" />

</LinearLayout>
28 changes: 28 additions & 0 deletions Android/res/layout/fragment_mini_widget_uvc_video.xml
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="85dp"
android:background="@android:color/black">

<TextureView
android:id="@+id/uvc_video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="85dp" />

<me.grantland.widget.AutofitTextView
android:id="@+id/uvc_video_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:singleLine="true"
android:text="@string/error_no_video"
android:textColor="@android:color/white"
android:background="@android:color/black"
android:textAllCaps="true"
android:visibility="visible"
tools:visibility="visible"/>
</FrameLayout>
65 changes: 65 additions & 0 deletions Android/res/layout/fragment_widget_uvc_video.xml
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/black"
android:minHeight="85dp">

<TextureView
android:id="@+id/uvc_video_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="85dp" />

<LinearLayout
android:id="@+id/widget_button_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="5dp"
android:orientation="horizontal"
android:visibility="gone"
tools:visibility="visible">

<android.support.design.widget.FloatingActionButton
android:id="@+id/uvc_take_picture_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@android:color/white"
app:fabSize="normal"
app:elevation="6dp"
app:borderWidth="0dp"
android:layout_margin="5dp"
android:src="@drawable/ic_camera_drawable"
android:text="@string/label_photo" />

<android.support.design.widget.FloatingActionButton
android:id="@+id/uvc_record_video_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:backgroundTint="@android:color/white"
app:fabSize="normal"
app:elevation="6dp"
app:borderWidth="0dp"
android:layout_margin="5dp"
android:src="@drawable/on_off_videocam"
android:text="@string/label_record" />
</LinearLayout>

<me.grantland.widget.AutofitTextView
android:id="@+id/uvc_video_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="@android:color/black"
android:gravity="center"
android:singleLine="true"
android:text="@string/error_no_video"
android:textAllCaps="true"
android:textColor="@android:color/white"
android:visibility="visible"
tools:visibility="visible" />
</RelativeLayout>
10 changes: 10 additions & 0 deletions Android/res/layout/list_item_uvc_device.xml
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>

<CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/name_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="@dimen/list_item_uvc_height_min"
android:textSize="@dimen/list_item_uvc_font_size" >

</CheckedTextView>