Google Cloud Messaging for synchronizing folder - android

I'm trying to develop an App whose purpose is to share files in my smartphone with some friends, kind of Dropbox. I have a FileObserver watching a directory and when any change is applyed to one of its files, the App should read and do some stuff with it, write the result in another different folder and upload it to a server in order for my friends to get them when they sync in their smartphones using, obviously, the same App.
I've been taking a look at Dropbox API but I think it's not possible to programme something like that, I don't know with Google Drive.
The thing is, I've come across Google Cloud Messaging and wondering if this could be the solution I'm looking for.
So I'd like to know if this is possible with GCM and how it could be done. If you know another way to do so it'll be welcome.
Thanks in advance.

Related

What is the best way to create a wallpaper app for android?

I am sure you are fine and happy. I want to create a wallpaper app for android. I am a newbie to be honest.
There used to be picasaweb and its api for storing albums and fetching images on an android application. This api is discontinued now. I searched for online tutorials. Almost all of the tutorials used this old api. Some of the tutorials were there, which were only using drawable folder images to set the wallpaper, which i do not want. I want to create an application where users can download wallpapers from my online storage. I found that there is now a google photos api. There is a good documentation of it. But i don't honestly know how to implement it in my app. I am a bit puzzled now.
My main question is, how should i proceed to create my app. It may sound a bit spoon feeding, but what is the best way to create this type of app. I know i will need to store images on a storage and will need to create an api to download and fetch image data on the storage. (Is there any good api available already, like volley?) Also, somewhere i found that i can use firebase storage, but i have read in both firebase and google photos api, there is a limit in the amount of access request users can make in a day. There is a partner program also. which increase these storage and request cap.
Also if the question is in a bad format, please forgive me this time, I'll be more specific next time. I'll be very thankful for any hints and help. Thank you very much.
For starting the android project, you can start by learning the Java programming language. Then you can following learning the basic android development. After basic, you can follow the Youtube tutorials to develop the wallpaper application. As for storage, you can follow this tutorial to store your wallpaper in Firebase which can be enough for the simple application.
The easiest way to do so without coding is to go appsgeyser.com and use one of their templates. You can create an wallpaper app for android there and use as many pics as you want.

BlobCache.UserAccount cloud syncronize on Android

I am trying to understand BlobCache.UserAccount option using akavache. So far I could successfully implemented BlobCache.LocalMachine which works only offline.
Accoridng to akavache documentation;
Xamarin.iOS will may remove data, stored in BlobCache.LocalMachine, to free up disk space (only if your app is not running). The locations BlobCache.UserAccount and BlobCache.Secure will be backed up to iCloud and iTunes.
Windows 10 (UWP) will replicate BlobCache.UserAccount and BlobCache.Secure to the cloud and synchronize it to all user devices on which the app is installed
I guess this is something done automatically by the OS when you place the data into the certain folders, it is being backed up and this is what akavache is doing. Is that correct?
If yes, Is there a way to have something similar with Android. Nothing is described for Android. Is there some backup happening on google drive or we can implement easily?
I think this is iOS specific indeed. I tried to look it up into the code, but couldn't find something specific for the UserAccount. So, I think your assumption is correct. It might be for a different reason though, but I honestly think its iOS specific.
It looks like with android it doesn't store into google drive
https://github.com/akavache/Akavache/blob/master/src/Akavache/Android/AndroidFilesystemProvider.cs#L40
I haven't done that much with saving files into google drive but it doesn't seem quite as straight forward as it is on Windows or iOS. On Windows just save into a Roaming Folder and run with it. Where as with Android it seems less plug and play
https://developers.google.com/drive/android/get-started
Creating a new Android application that uses the Google Drive
Android API requires several steps.
I think in theory you could register your own IFileSystemHandler into Splat if you want to wire that connection up.

How to upload an image to Google Cloud Storage in Android App

I am attempting to use Google Cloud Storage to store images for an Android Application I'm building. I'm a beginner with cloud stuff but I've already set up an endpoint to store structured data in the google cloud datastore and I'm using app engines standard environment.
I've read conflicting things about how to go about this but I'm currently using this guide: https://cloud.google.com/storage/docs/object-basics#storage-upload-object-java and trying to do it in the endpoint I've already set up. I did try to use the library directly in the app however trying to run with the dependency for it caused the app to crash on startup.
The guide I'm using doesn't talk at all about setup like how to get a bucket object of a given name (I've found how to create one but I want to use my apps default bucket which already exists).
Questions:
1) Is doing it in the endpoint the best approach? I want the simplest possible solution so I don't really want to use an extra thing like firebase if I can avoid it
2) For whatever solution is the best, can you give/link me a comprehensive explanation of how to hook it up starting from the Uri I get from the FilePicker all the way to uploading it to GCS? I've found so many explanations which explain part of the process but they don't fit together.
https://github.com/TdevM/FirebaseStorageTest/blob/master/app/src/main/java/tdevm/storagetest/ui/GalleryActivity.java
Here's my test project which i created to upload images on Firebase Storage. Firebase Storage is based on Google Cloud Storage.Comment back if it helped !
If google drive app is installed on the device where your app runs you can simply use intent `ACTION_CREATE_DOCUMENT to create a file in the cloud.

Any free SDK to store and return data?

I am looking for very simple data storage and retrieval from cloud. A solution something like the Evernote API.
I dont want to use Amazon or Google App Engine as I want to use easy to use SDKs to retrieve data rather than writing my own web Services.
Any suggestions please? This is for using in my Android app.
Apart from Evernote, I am able to find Dropbox also has API to store simple data and what I am looking for. I totally wonder why no one tried answering me in spite of having Android tag. Not sure if something is wrong the way I asked.

Google Cloud Storage in an android app

I'm trying to put a text document with highscores inside a bucket on the google cloud storage. So far, so good.
Now I want my app to open this textfile in the bucket, check if there is a new highscore, adapt the file and write it back into the bucket.
I´m trying to find example code, since that makes more sense to me for understanding than the apis, but I´m not able to find it.
The answers I get are all, it´s just simple get and put callbacks, but since it ain't simple for me, I was hoping somebody has a link to an example for an android app using google cloud storage and reading and writing online.
I found this information, but would love to see an example for android in eclipse: http://code.google.com/intl/nl-NL/appengine/docs/python/googlestorage/functions.html
If I'm creating an app in Eclipse, can I use the bucket in the google cloud? Or don't I or future users have access to that bucket for read and write?
Look at the Google api client libraries for java. Google storage has a Json Api (currently in beta and you must email to get turned on). The client libs are fairly straight forward once you get your head around it. All google apis are accessed in the same manner. You can use the Android Tasks example to learn from and apply it to Google Storage Api.
http://code.google.com/p/google-api-java-client/wiki/APIs#Tasks_API
Since you want to change files, I would advise to use Google Appengine's Blobstore or either save images as BlobProperty in GAE. CloudStorage is more for static files, I believe.

Categories

Resources