URL for localhost website's video files - java

I'm trying to develop an Android app that can access a website's video files and download them. My code works well with public websites but I'm trying to figure out the url I could use for a website on my localhost.
My friend developed a simple site which I can upload video files. The videos are uploaded to the projects ".Web\Assets\Videos" directory. But I'm having trouble determining the url for the localhosted video files.
http://192.168.1.23:11124/Assets/Videos/video1.mp4
file:///192.168.1.23:11124/Assets/Videos/video1.mp4
Both dont seem to work. Any ideas?

Related

Unable to configure JSON in android studio

I'm working on a project. There is a website coded in asp.net and database is SQL. and there is a mobile app connect to this site.in app it used JSON and no db codes. I added new tables to this site and I want to configure it from android studio. I'm new to JSON so I can't config the database from android studio. And I want to know what is a .ashx file is? I can't add code snips due to privacy policy in company. Thank you very much!
.ashx file details:
A file with the ASHX file extension is an ASP.NET Web Handler file that often holds references to other web pages used in an ASP.NET web server application.
The functions in the ASHX file are written in the C# programming language, and sometimes the references are so short that an ASHX file may end up just being a single line of code.
Most people only encounter ASHX files by accident when they try to download a file from a website, like a PDF file. This is because the ASHX file references the PDF file to send it to the browser for download but doesn't name it correctly, attaching .ASHX at the end instead of .PDF.
source: https://www.lifewire.com/ashx-file-2619693
And as far as I think for accessing JSON in the android studio you can look into volley.
Volley Documentation: https://developer.android.com/training/volley

Upload files to Google Drive from App Engine application

I'm trying to implement App Engine app that should upload files from user computer to Team Drive folder.
Currently I'm trying to do it with .jsp and servlets but it seems that it couldn't be done that way.
I'm using Service Account and Drive API Client Library for Java - https://developers.google.com/api-client-library/java/apis/drive/v3
It seems that when uploading files in such way you should use java.io.File which is impossible on App Engine, because file isn't stored on instance but it is uploaded from user computer.
Is it any way to upload file directly to Google Drive using App Engine?
Additional note:
I'm using Drive API v3.
In Drive API v2 there was file.insert() method available which lets you sending InputStream as input parameter. I think such method could help me with upload but it is not included in API v3.
https://developers.google.com/drive/api/v2/reference/files/insert
I think you're looking for protected Create(File content, com.google.api.client.http.AbstractInputStreamContent mediaContent) from https://developers.google.com/resources/api-libraries/documentation/drive/v3/java/latest/

Store files in google drive from Google App Engine

All,
I have a google application engine (java) that requires to store some images. I tried using Blobs and storing them in datastore but as you know there is a size limit on data that can be stored in datastore.
So as result I'm storing the images on a different server and store the path in my datastore and all works fine.
Now I'm thinking on using a google drive folder instead of using a server to upload the files to the drive and using the share link to display them later.
I've seen https://developers.google.com/drive/web/quickstart/java and got it to work fine. When I try to use it in my application however obviously this won't work as the code is assuming a credential for a local user.
I created a service key on my application and want to change the sample code above to use it but I'm not sure if that's the correct approach.
Tried searching for samples but can't find anyone that takes the same approach. Is there a working sample that shows how to authenticate an application not a user and let's say store a file in google drive?
I've also seen https://developers.google.com/drive/web/examples/ please note what I want is to store files in my google drive and not the user's google drive. So if user A and user B come to my app, they shouldn't have to authorize my application and should both be able to upload a file to my google drive.
I don't know if this can be done directly from their browser or I have to move the file to my application (appspot) and then push it to google drive.
Thanks

How can i place my videos on my own server and make URL of them using net-beans

I want to store videos on my server and make URL of them so i can use in android video view.
e.g
http://swytchboard.s3.amazonaws.com/Videos/102_1378616771.mp4
Please help me how can i do this using java or using some other environment .

Download a pdf file from android application using Jsoup

I would like to download a pdf file from my android application. I want to download it using jsoup because I have to post username, password and cookies, so I have done it with jsoup. I have check the site adn saw that I have to connect at the login page and post: username,password,cookie and a variable next with the internal link of the pdf file. I have done it with jsoup but now I don't know how to download this file at my android device. I prefer, if it's possible, when it will download to appear on the notification bar of my device.
Thank you in advance!

Categories