I would like to have a background service running all time that register the device using the Parse API and emits Push Notifications, while having the main app developed in Qt with QML/JS. My question is: Is this possible? How can I do it? Is there any code-like example or documentation?
This is because I would like to write my application using Qt (QML + JS) and use Parse on the server side with it's PHP SDK.
Thanks for any help!
this should help (commercial solution):
http://plugins.v-play.net/plugins/parse/
Related
I.m going to make the new Android app using Firebase Cloud Message (topic system).
-Can I use Multi-subscribe systems(ex.topic1, topic2) in the android app?
-Can I see an example?
Does not matter Java or kotlin
I want to make my web service by using RoR and extend this service to mobile.
I searched how to connect RoR with android on google, However , The answer is building new ROR application with API only mode.
But I want to add API to the existing web application. How can i do this?
thank you!
The simple workaround is to create a api folder(api/v1 incase you are also planning versioning in future) in controllers,views & helpers.
Create a controller in controllers folder & the content would be like:
class Api::V1::TestsController < ApplicationController
def show
render 'show.json.jbuilder'
end
end
User Jbuilder to return response in json format.
There would be a json view api/tests/show.json.jbuilder.
The content of that file would be like:
json.equipment do
json.id #contact.id
json.name #contact.name
json.type #contact.type
end
and you are good to go.
I have created an android sample project using AWS Mobile Hub with User Sign-In and Push Notifications services.
I've downloaded the project and opened it through Android Studio, in order to take the necessary files for push notifications from the sample project and to integrate it in my existing Android app.
I thought it would be simple, but then I found out this huge files branch:
It is difficult to understand what files I do need and what files I don't need. Could you please help me to figure out what do I need to import into my existing project in order to integrate Push Notifications in my app?
You should copy the contents of MySampleApp/app/src/main/java/com/amazonaws verbatim into your new project and Also parts of AndroidManifest.xml and build.gradle and Application.java.
For a complete instruction, I would recommend that you go through Mobile Hub Console > Project Name > Build > Select Android > On Left side go to develop > Use as an Example.
You will find all the instructions you need for your android project
The "PushListenerService" class is basically a useful example class where the magic happens. So keep every file that support that class. The
private static void generateNotification(Context context, final String message)
is what displays the notification message.
Another important note is how to get the user's device endpoint value. This can be gotten using the "PushManager" class.
String endpoint = pushManager.getEndpointArn();
The endpoint ARN of a device help you send direct notification to that device.
PublishRequest publishRequest = new PublishRequest();
publishRequest.setMessage(message);
publishRequest.setSubject(subject);
publishRequest.withTargetArn(endpoint); //This can also be a "topic" ARN
snsClient.publish(publishRequest);
Pretty nice job done by the guys at AWS. Big thanks to them! :D
There is no easy way out. Just take your time and go through all the code in the classes that relate to the AWS service you want to implement. Good luck!
Btw, make sure your app is not open on the test device when you send a notification to it or else you won't see a notification since your app is already running. I notice this is a default behaviour.
I have a Worklight 6.2 app. I am modifying the android java code to subscribe to a notification sent via Bluemix. After the user logs in, I would like to register the device using the userid that gets created. Is there an API call that I can use within the android code that is the equivalent to WL.Client.getUserName, or should I be calling the java code from my javascript and passing the userName to the java code? Thanks for any suggestions.
JT
There is no Java equivalent to this. This is a Worklight API.
What you can do is use the new WL.App.sendActionToNative method in Worklight 6.2 for to send a value to your native code and from there do what you need with it.
WL.App.sendActionToNative(“doSomething”, { customData: 12345} );
Where customdData is the WL.Client.getUserName.
On the native side you then need to use WLActionReciever (see What's New).
You could also opt to implement a basic Cordova plug-in that will move data from the web to native view.
The tutorial in the Getting Started page is doing exactly that.
I have created an application in Android for RabbitMQ using RabbitMQ-Android tutorial. It is working fine. Now I want to create two applications in Android and I want to make a communication between them using RabbitMQ.
I have not found any example nor tutorial regarding this issue.
It would be a great help, if you could provide a link with code.
Thanks for your reply. I have created my first application using this tutorial only. But this tutorial shows the connection between Android and .NET application through RabbitMQ. I don't have .NET application. So, I want to create one more application in Android, and I want to send message between these two applications using RabbitMQ.
Is it possible??
Please give me any suggestion on this topic.
Thanks
Simon Dixon has a good tutorial that should get you going: http://simonwdixon.wordpress.com/2011/06/03/getting-started-with-rabbitmq-on-android-part-1/
You can use a Python script below to send message to Android client application.
#!/usr/bin/env python
import pika
import time
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost'))
channel = connection.channel()
channel.queue_declare(queue='hello')
i = 0
while True:
channel.basic_publish(exchange='logs',
routing_key='hello',
body='Hello World, ' + str(i))
print " [x] Sent 'Hello World!'" + str(i)
i += 1
time.sleep(1)
connection.close()