media

Android : Get recently added media in Android Device similarly to File Manager

半腔热情 提交于 2019-11-30 16:13:23
I am working on an application in which I have to notify user as soon as a new image, video, audio or apk is inserted by the user by any means (whether he downloads it or transfer it),similar to what File Manager application do.I don't know where to start from. Thanks Here is my complete code to notify user when a new media (image, audio or video) is added into the device. It might help someone.Also, I am displaying push notifications as soon as new media is added. EDITED (issues resolved are below) 1.Notify user only when media is added,not deleted. public class MediaTrackerService extends

Android : Get recently added media in Android Device similarly to File Manager

自闭症网瘾萝莉.ら 提交于 2019-11-30 16:09:58
问题 I am working on an application in which I have to notify user as soon as a new image, video, audio or apk is inserted by the user by any means (whether he downloads it or transfer it),similar to what File Manager application do.I don't know where to start from. Thanks 回答1: Here is my complete code to notify user when a new media (image, audio or video) is added into the device. It might help someone.Also, I am displaying push notifications as soon as new media is added. EDITED (issues

Webrtc media over tcp?

牧云@^-^@ 提交于 2019-11-30 15:46:45
I am new to WebRTC. I was learned about the turn server. The below thing is used to configure the turn server works on TCP for a webrtc application. Example turn server configuration in webrtc application :- { url: ‘turn:192.158.29.39:3478?transport=tcp’, credential: ‘JZEOEt2V3Qb0y27GRntt2u2PAYA=’, username: ‘28224511:1379330808′ } The meaning for the ?transport=tcp is it works on TCP protocol like that they said. My question is, The turn server works on TCP means, it is only for establishing a connection between turn server it works on TCP or for transferring a WebRTC media via turn server it

accessing webcam in web pages

依然范特西╮ 提交于 2019-11-30 15:44:06
问题 I am developing a web application. In my guest registration page I need to access web cam for taking images of guests. The image which I take could be able to stored in a specified location. Which will be the best way to perform this. Methods using java, JSP, html, java script or any other methods are welcomed. 回答1: jQuery Webcam Plugin does the hard work for you: http://www.xarg.org/project/jquery-webcam-plugin/ 回答2: Answering own question, as there is a better way using HTML5 is available.

Using MediaController on Android 5

安稳与你 提交于 2019-11-30 15:37:35
I want to use the new MediaController in Android 5 instead of the old RemoteController for getting the currently playing track and changing the track. I couldn't find any examples so I tried it by myself. To get the current MediaController , I have implemented a Class which extends MediaController.Callback and implements MediaSessionManager.OnActiveSessionsChangedListener . With this method I try to get the current mediaController : @Override public void onActiveSessionsChanged(List<MediaController> mediaControllers) { Log.i(Util.LOG_TAG, "sessions changed"); if (mediaControllers != null &&

Strange issue in Combining Audio Files and playing in different API versions

我与影子孤独终老i 提交于 2019-11-30 14:57:14
问题 All , I am using Media Recorder for Recording Audio . Case 1: If i use Android Version 2.2 installed devices , my recorded audio combined and playing well. Case 2: If i use it in Android 1.6 installed devices , i am not able to play the combined audio file. It is playing only the very first recorded audio and next recorded audio files keep empty no sound . Also i am not getting any error in Logcat . I used following code for recording audio : mRecorder = new MediaRecorder(); mRecorder

JMF replacement

不问归期 提交于 2019-11-30 14:08:23
问题 JMF is old, and doesn't support a lot of codecs properly. I get by these days by using FFMPEG in the background, but I would like to switch to a native java solution if one exists, does anyone know of a current open source Java project that has media manipulation functionality? 回答1: It depends what you want to do. Since you are using ffmpeg, then I assume you are encoding videos. I am pessimistic that Java will do such work 'native' in the short or medium term--it very much goes against many

Downloading the files(which are uploaded) from media folder in django 1.4.3

為{幸葍}努か 提交于 2019-11-30 13:41:51
I am using django to design the basic web pages that handles the uploading and downloading of the files to/from the media folder Actually the files are uploaded successfully in to the media folder, also files are downloaded successfully but an underscore is appended to the file_name as a last charater like file_one.pdf_ , file_two.pdf_ , file_three.txt_ etc., Below are my codes urls.py urlpatterns = patterns('', url(r'^upload$', 'learn_django.views.upload'), url(r'^files_list$', 'learn_django.views.files_list'), url(r'^download/(?P<file_name>.+)$', 'learn_django.views.download'), ) if settings

Strange issue in Combining Audio Files and playing in different API versions

旧城冷巷雨未停 提交于 2019-11-30 12:49:30
All , I am using Media Recorder for Recording Audio . Case 1: If i use Android Version 2.2 installed devices , my recorded audio combined and playing well. Case 2: If i use it in Android 1.6 installed devices , i am not able to play the combined audio file. It is playing only the very first recorded audio and next recorded audio files keep empty no sound . Also i am not getting any error in Logcat . I used following code for recording audio : mRecorder = new MediaRecorder(); mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC); mRecorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);

How do you Require Login for Media Files in Django

牧云@^-^@ 提交于 2019-11-30 11:52:06
问题 I'm serving "sensitive" information in downloadable PDF's and Spreadsheets within a user registration section of a site. Is there a way to allow the django authentication to secure this media without serving it (and not have to manually login using basic auth)? I'm guessing theres (fingers crossed) not a way to do it with the psuedo code below, but it helps better illustrate the end goal. #urls.py (r'^protected_media/(?P<filename>.*)$', 'protected_media') #views.py from django.contrib.auth