I want to build a app with sharing option. I mean that users can pass simple data between their contacts, that use the app. And I don't want to use servers of mine.
Is it possible to use existing platforms such as Facebook, Google, or even with android APi only?
If it can be done, how can I do it?
You can try with gcm - Google Cloud Messaging for Android
Nevertheless, for this you will have to use some kind of server to send push messages.
I created the free and Open Source web service cross copy to do file and message transfer between devices via simple RESTful commands:
waiting for messages to appear "on the given codeword" (long polling):
GET http://cross-copy.net/api/any_codeword_you_like
sening a message in body to all waiting clients:
PUT http://cross-copy.net/api/any_codeword_you_like
Both devices must use the same codeword and hence it must be agreed upon (displayed on screen, QR-Code, prediefined, computed by geo location or what ever fits for your application. More infos are available in the readme at GitHub.
Related
I have a new project at hand where I need to make two android applications
1)Main Controller application (be installed in one device say its name be X)
2)Sub Child application (be installed in devices that need to be controlled by X )
So I want to get an idea/picture about how one android device like (2) can be managed fully(i.e. blocking applications or making them accessible for some interval / block calls / track location of user ) from another device like (1). So far I searched Google ,asked my seniors about the same but none was able to help me out.Found many scattered info (like need enterprise app to do this i.e use android management API or Device admin ) but not being able to get any clear idea about the work flow.
Thus now this the last place I can think of for helping me out with this work flow.
Reference
Update: Based on what #Fred said i.e. to use android management API (also based on the answers that he posted here) could we somehow have own custom web server and manage the interactions that EMM console does with all the child apps through our own API's(the same API's which we would call from the parent app.) ???
In other words instead of controlling form the EMM console, I would like to control those child application from another parent android application.
By FCM or Socket programming you can easily communicate with other app. Suppose 2nd app receive a call then 2nd app call a api of server about the information, then server knock 1st app by fcm or socket, then 1st app make a decision and submit the decision to server by API, And finally server submit the decision to 2nd app by FCM or socket.
You can check out the Flyve MDM which is an open source mobile device management solution including both agent app and web panel for management.
I am learning about google actions and made a basic, google-keep like app which records notes for logged in users. it has a mobie client and a firebase server. i wish to know if assistant could be made to interact in such a manner that notes could be created via an assistant session without opening the mobile client at all.
For example:
User (on any screen): "hey google"
AI - "hi , how can i help?"
U - " place a note to call david in customNotter" ( suppose)
Ai - "am sorrry, customnotter does not exist on your mobile , download it from playstore http"//www.link..."
U - *downloads customNotter app , installs, logs himself in*
U - " place a note to call david in customNotter"
Ai - "Ok, your note is saved"
*saves note "call david" in customNotter (by somehow calling some code to interact with customNotter's server?)*
I can imagine a kotlin code that could be included in my app , which the assistant could trigger which could simply add the note to server, but cannot imagine how assistant could trigger that code with user's auth details and the note data?
PS: Also i wish to know if google home could also be integrated for such app. And if not , what are the key factors that would limit google home to not interact with my server ? like suppose am building a complete business model for CustomNotter , where there is a unified server and many clients like ios / android / web apps . can google home be able to act like another authenticated client, interacting directly with the server?
The best option is to use Actions on Google to directly make calls to your Firebase server and update the database that way. The hooks into Android apps are not deep at the moment. Android Actions were announced, but are not available right now.
The benefit of doing this is that your Action will work on any Assistant surface, beyond an Android phone, and will not require the user to install your app.
Since you can run Actions on Google on Firebase Functions, it is easy to incorporate into your Firebase database.
You're making a couple of assumptions here, but before I make different assumptions, I want to clarify something. You said "it has a mobile client and a firebase server". I assume the "firebase server" is what stores the user's notes?
If so, then you don't really need to have the app installed locally at all for the Assistant to work with it. You just need to make sure your mobile app and your Action both have the same user account reference, so they can update and read from the same records in the database. This would work anywhere the Assistant can run Actions - on a mobile device or on a speaker such as Google Home.
In this case, your conversation might look like this:
User: Hey Google, ask Custom Notter to remind me to call David.
Assistant: Getting Custom Notter
[Earcon, indicating your Action is running]
Action: Hi there. I've added a note to call David.
[Earcon, indicating the Action is done]
This is a very simple example of the conversation. Other conversation flows may also want to indicate if the user hasn't connected such an app to the account, or you may need to prompt them for permission to use their account, etc.
You will need to write server code to handle the processing - all Actions interact with a webhook running on a server in the cloud. You can write this in any language you wish, including Kotlin, and on any service you wish - however Google provides libraries and other support if you run it in node.js using Firebase Cloud Functions or on Google's Cloud.
All the details are available at https://developers.google.com/actions/
If you do have a mobile app, and you want to look into how to get the Assistant to launch things in that app, you can look into App Actions, which are coming soon for Android.
Is it possible to create a listener to get a message from whatsApp in android?
I mean like you have a broadcastReceiver to listen to incoming SMS in android...
Is any API is needed for that thing, or is it legal thing to do or I need to get any permission from whatsApp?
Whatsapp did not publish any official APIs.
There's this open source API for communicating with whatsapp, it's not official and might stop working if Whatsapp update their protocols.
https://github.com/venomous0x/WhatsAPI
Regarding the legality of using this or other non-official API, it depends on the service agreement that you agreed to with Whatsapp. Read it and see if they frown upon using their communication protocols with clients other than theirs. My guess would be they do not allow it.
UPDATE: This GitHub repository seems to have been taken offline due to legal threats.
It is possible, an example of an Android app that does this is Snowball - basic notification manager that can access WhatsApp message content. I'm not quite sure on how that works, but research Snowball to get more information on how it works.
It is also possible without Android, the source repository on GitHub has been taken down and put back up a few times due to legal threats.
If you do, however, manage to connect to WhatsApp's servers to access incoming and outgoing messages with a desktop app and you don't hide it well, your account will be blocked. WhatsApp notices accounts that send messages faster than it would take for a normal person to send - easy to notice because a human takes time to type, try delaying messages by a random number of seconds to try and hide this. Also note that WhatsApp's terms of service state that you may not run any automated system using the service, i.e. any external app. You may not use the service to advertise or spam (raises red flags pretty fast and gets your account blocked).
There is also another library written in Python which you can use write custom application.
It also has terminal client and you run it in interactive mode and also supports group messaging.
There are lots of issues to fix.However you should not be abusive with whatsapp service.Don't use it to spam users.This is reverse engineered library and therefore unofficial.
Here the link:-yowsup
I am currently using Windows Azure with Android and need to sync data between sets of users using PUSH notifications.
For example: User A uploads data to Azure which is stored in the SQL DB. That then needs to be pushed down to a specific set of devices and stored locally in SQLite.
What is the best design pattern for this? Should I be pushing the data with the PUSH notification or be using PUSH as a prompt for the app to then connect with azure and download the data.
Thanks for any help.
I'd think you would want to send a notification to the device that prompts the user to launch the app, and then the app fetches the data. I don't know how Android push services work, but I'd assume there is a fairly limited amount of data you can send in a single notification.
The best way to accomplish this is to use Windows Azure Mobile Services and the unoffical Android SDK.
The unofficial Android SDK can be found at: https://github.com/goldshtn/wams-android
The benefit of using Mobile Services in this case is that it's super easy to writer server-side scripts on INSERT. After you connect your project to a Mobile Service, you'd then head to the 'Data' tab, select the appropriate table, and then head to 'Script.' Pick INSERT from the dropdown, then write a function that sends a push notification to the designated subset of users. You'll need to write this in JavaScript.
There's some code you can work from included with the unofficial SDK, but if you check out https://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-push-dotnet/#update-scripts you can get a sense for the steps you'd follow for an app on any platform (though the tutorials will only walk through Windows Phone 8, Windows Store, and iOS at the moment).
I am conceptualizing an Android app that sends data from one device to another (like a picture message), but because I do not have a server, I am looking into other ways of messaging. Google Cloud Messaging (GCM) seems like a good choice, since its made for Android, and is free to use, but it still requires a server to use. Is there a way around this requirement- such as running the GCM server on the app itself? Or is there a better approach to serverless messaging on Android?
Yes you can - it's possible to send the same messages from a device that would be sent from a server. However, this has the following problems:
You're putting your API key in your app, so somebody could decompile your APK to get it.
Your users would need some way to share their GCM registration IDs with each other. If two users had both their IDs expire at the same time, there would be no way to share them again.
Really, building your app and hosting it on AppEngine would take about an hour to write, and cost less than $10 a month, even for a ton of users.
For a dead-simple messaging server example written in Java, check out the server backing one of my apps:
https://github.com/charlesmunger/touch-to-text-server.git
I think that will be hard to do what you want effectively without a server but you can check out Parse's SDK. It is free to try and free up to a certain monthly limit.
The docs.
You may want to read "Sending Pushes to Channels" and "Using Advanced Targeting".