Uploading Images to cloud while using app Inventor for Android - android

I am not able to device a way to upload images to any of the cloud services from an app Inventor project. My use case is to take snap from one install of the app and should be accessible to other install of the app [on a different phone with a different user].
Until now I have looked into : http://puravidaapps.com/drive.php
But this tutorial only explains to access gDrive of the user which would be separate account.
I have also looked into imgur APIs but they need the image to be converted in base64 format.
In short, any of following answers should solve my purpose.
1) Getting gDrive to work without user asking to do the authentication to the app's service account
--> Any link to achieve this would be very helpful as I am lost in documentation and somewhere it clearly says that it only supports OAuth 2 authentication, which I understand that the user will have to use their own account information
2) The APIs from imgur and other such image hosting services needs the image to be converted to base64
--> Is making a separate procedure using the file component following https://en.wikipedia.org/wiki/Base64 is only option or I can get it converted using some other service too.
EDIT : I see that it is not possible to parse the image contents using any of the components in app inventor
3) I also think that it easy to get and upload images to an ftp server. I am yet to see a free ftp service.
4) Is there any other way I can do it.
I am emphasizing on free services because my app is free and for a social cause.
Any inputs and suggestions are welcome!

You can use my Google Drive interface also without login, in this case the images will be uploaded to your Google Drive, see my example app, which is available in the Download section there
There is currently no block, which converts an image into base64, but you could write your own extension and create a block yourself. More information about how to create an extension see the announcement,
however that will be more advanced and will require some Java skills...
I can offer my App Inventor FTP extension
Other ways to upload images (there might be more):
a) uploading to your web server, see my postfile example
b) uploading to Dropbox, see my Dropbox example
I am emphasizing on free services because my app is free and for a
social cause.
You might want to read a little bit about TANSTAAFL...

Related

Get referring url for Android or iOS installation

We have several landing pages that link to Google Play and iOS App Store. I would love to know the landing page that a person came from within the app code. I have searched around and can't find any clear answer. Lots of gray area.
I just want to access the landing page URL in Java or Swift.
I realize iOS and Android are two separate beasts. But does anyone know how I could achieve this?
You will need to use Firebase Dynamic Links this helps you create various links using various alternatives as shown in this quote from the official Firebase source:
You create a Dynamic Link either by using the Firebase console, using a REST API, iOS or Android Builder API, or by forming a URL by adding Dynamic Link parameters to a domain specific to your app.
Then your app can access the link in code using Java or Swift and the link will work even if the user has your app already in their phone and you can set a logic to handle that too and the links are also automatically direct the user to AppStore or PlayStore depending on which device is used.
Dont worry about whether the link will work for both Android and iOS and you can use the api to access the link as this quote says.
With Dynamic Links, your users get the best available experience for the platform they open your link on. If a user opens a Dynamic Link on iOS or Android, they can be taken directly to the linked content in your native app. If a user opens the same Dynamic Link in a desktop browser, they can be taken to the equivalent content on your website.
In addition, Dynamic Links work across app installs: if a user opens a Dynamic Link on iOS or Android and doesn't have your app installed, the user can be prompted to install it; then, after installation, your app starts and can access the link.
You can get more information on dynamic links here and check if it will solve your problem.

What is the correct way developing website applications in Cordova?

I'm trying to do some simple website application for displaying my website and add some specific functionality to it.
My idea is to do something like Facebook app for mobile. Simply I need to display a website and replace File input - users should be able to capture a picture from camera or pick it from gallery (multiple select) and attach it to a post.
TL;DR;
Check images in the bottom.
What I have tried:
Using Cordova with Camera and Image picker plugin and displaying webpage in InnAppBrowser
Taking pictures with camera and picking pictures from gallery and then uploading them to server - there is a lot of examples of it.
What troubles I have found:
InnAppBrowser is forced fullscreen so I cannot resize it and place some buttons for picking pictures under it.
What do I need:
I just need to somehow attach images (from gallery or camera) to form file input or upload them to some kind of api instead - the api would process images on server and return some IDs which I can use instead of file input in the form on page to attach images to the post. Some hidden input where I would just insert IDs of uploaded images to be attached to the post (I'd write some if conditions into my PHP script).
I need my application to be multi-platform (Android, IOS, WP) so that is the reason I'm using Apache Cordova. I've tried lot of solutions and I've searched like for 5 hours. But I wasn't able to find anything useful.
Have somebody some experience in this way? Did somebody make some kind of that application?
If you can suggest any solution (it is not important to be a Cordova but it must be multiplatform) I'd be glad!
Thanks for your time!
Images
There is screen of desktop version with normal file input:
There is my vision of mobile application version with camera and image picker option right under web browser:
I guess I was not clear. The technical answer is Cordova/Phonegap are not for creating website applications. This means technically there is no "correct way" to do what you are asking.
For a website applications, all the pages are rendered from the website and controlled from the webpage/webbrowser.
For a mobile application, all the pages that the application can directly control are rendered on the mobile device. However, pages can be rendered (and/or created) from either the server or the mobile application, but the control of the page stays with the side that rendered (or created) the page. There is clear line between the two sides that can be moved, but at the *peril* of the programmer. (There are no points for being clever here, only added security issues.)
However, the Cordova and Phonegap do have plugins.The entire purpose is to use plugins to make certain task easier. However, there is a clear line between the phone and the website. To be clear on this last part, this means that all of the "plugin services" on the phone (accelerometer, contact list, etc.) are directly available to the application, and not the website. However, some of the "services" are also available as HTML5 APIs, such 'camera' and 'geolocation' – mixing the two is dangerous. The HTML5 APIs should remain on the webserver side, if used. The UX is different for HTML5. (I will not discuss HTML5 APIs any further, as they are beyond the scope of this discussion)
To make your idea work, you will need the following "core" (or equivalent third-party) plugins
file-transfer
camera (or equivalent)
inappbrowser
On the file-transfer and camera, you can do everything from the webserver, if you want. Then the only task for the end-user is to select the appropriate folder and image. If you do this from the server-side, then you CANNOT use the plugins.
If you want to use the plugins, then you cannot use a server-side generated webpage. You must create the form on the mobile device. This means the page and the form reside on the mobile device. However, if you write your webpage correctly you can dynamically add or delete elements. This means on the mobile side you have control over every step of the user experience and can enhance that experience.
On the inappbrowser, a common trick is to put the website in an iframe. However, you have no direct control on the iframe. Another common trick is to submit to the server via an API – then have the visible webpage update separately. Another common trick is to have a webpage with a websocket that could handle the webpage update. However, this could also be done with a push to the webpage, or have the webpage do polling of the server. Again, the App has NO direct control of the webpage.
This entire thread makes the following assumptions.
There is no "correct way" to do this task.
The images (photos) are stored on a website, and are publicly available for viewing.
It also assumes that no HTML5 APIs will be used.
If I interpreted your problem statement correctly, I believe what you are looking for is access to device native services - camera & gallery - from your mobile website.
A solution that fits your design requirements is for the browser to provide such services. Unfortunately WebKit and other browsers limit such support to things like Geoposition.
The way for Cordova to help you here is if your mobile website is an stand alone HTML5/CSS/JS application that can use CORS XHR or WebSockets to communicate with webindependent Web Services.
If you can bottle your website into a set of static html/js/css files that display content from dynamic web services then you are set. That same javascript can then call navigator.camera.getPicture(success, fail, options) and file-transfer the result to a waiting web service.
That camera api is not available to the InAppBrowser just as it is not available to WebKit Chrome/Safari/Edge. Trying to control the Mobile App via the InAppBrowser is most likely to fail due to security constraints.
What you might get away with is re-imaging your browser application as a series of discrete services that return raw html snippets suited for a new mobile app. Then write your Cordova app as the top level container that manages the navigation amongst the html snippets. This server-side rendering would be most useful if it was significantly challenging enough to overwhelm the mobile platform / web services pattern (think custom video server or expert system).
#Jakub,
Cedric has essentially stated it plainly. I will restate. You understanding about Cordova/Phonegap is not correct.
From: Top Mistakes by Developers new to Cordova/Phonegap
You have hit issue #5.
I QUOTE:
From Phonegap FAQ
A PhoneGap application may only use HTML, CSS, and JavaScript. However, you can make use of network protocols (XmlHTTPRequest, Web Sockets, etc) to easily communicate with backend services written in any language. This allows your PhoneGap app to remotely access existing business processes while the device is connected to the Internet.
In addition, Apple frowns on using apps as wrappers for websites.
Quote Apple iTunes Guidelines - 2.12
Apps that are not very useful, unique, are simply web sites bundled as Apps, or do not provide any lasting entertainment value may be rejected
To be clear, your idea may be valid, but you will likely need to rethink your internal workflow. You likely want to keep the same UI and UX.

IOS/Android app uploading videos to YouTube?

I am developing an IOS/Andriod app where I want my users to be able to upload videos - these videos will later be used by the app. Since I don't want to spend a lot of money on data storage I was thinking of using YouTube as the placeholder of the videos.
Is is scenario supported by YouTube?
Are there any limitations for me to consider regarding this scenario?
Is it OK if my app uses only one YouTube account - which my app users share and use when they upload a video? Or do my app users I have to use a personal YouTube account to upload the videos?
Anything else I should think of which I might be missing here?
Thanks
Thomas
I am going to answer you about android because I know about how you can achieve this in Android apps.
Here's a simple step by step to learn how you can integrate Youtube in your android application. for doing this You will need to download the client libraries written in java. Download the library here
This scenario is supported by Youtube
It will be OK to use only 1 youtube account to upload videos to Youtube. but all users have to share that account
One thing you can consider to make sure not to upload very large files (more than 100MB). although it will upload but it can take much time.
It is possible to upload capture/gallery videos on your own channels, not possible to use like all users data storage.

How to implement opendrive in android application

I know there's an apk for opendrive in android market but can anyone show me a tutorial or link which shows how to implement opendrive in android application
i have googled it but all opendrive provides still now is there own apk link in googleplay appstore: https://www.opendrive.com/apps/android
please give me a link or a example how to implement that
EDIT: I have completed the login and checking of files in OpenDrivein android but I can't implement the upload and download for it because I can't find any url's for it, does anyone know of the url's required to implement Opendrive in android application?? i have mailed to their support centre also but still no help from there too
any help is appreciable
thanks
The following are the features provided by opendrive.. which feature do you want in your application?
Upload and preview files
Upload new file version
Create folders and subfolders
Send file to email
Store files for offline
Access Shared folders
Copy link to clipboard
Play music and video
Keep me logged in
Passcode Lock
There is an API of OpenDrive. You can use that. They also provide example code, that is in PHP though.
Dropbox, Google Drive, SpiderOak, Ubuntu One and SkyDrive include many other similar options you have in case you want better and more tested API.
[EDIT] Ubuntu One Comes with documentation for Android too https://one.ubuntu.com/developer/ . If that can serve your purpose, go ahead use it.

Android app for third party that can share on Facebook

I'm developing (actually it's done, only the Facebook and Hyves shares are missing) Android mobile app that should share image to Face and Hyves.
There are couple of problems that I do not understand, so I need (urgent) help.
My idea was to save user/pass on device, and to check during the input if these details are correct. Then I wanted to somehow use API's to share image on the wall, preferably without any additional apps created, just share photo like you would share it from gallery.
Now I'm reading Facebook Developers guide, and it advises to create facebook app with domanin / e-mail, but this is not my app and I do not have authority to create anything in the name of third party.
So, what is the proper way to share photo to Social Networks, without creating "apps" and getting apps ID and stuff.
It seems that I can't find that kind of info on FB Developers page, and I'm afraid how will I get proper information for hyves (Dutch social network, and I do not speek dutch).

Categories

Resources