I want to understand how Xamarin.UItest actually interacts with app - xamarin

So I am relatively new to Xamarin apps and Xamarin.UITest. What I want to understand is how it actually works under the hub? For example, for Appium we know that the script communicates with Appium server via JSONWP then Appium server sends response to UIAutomator which translates it and sends to Bootstrap.jar.
I know that communication is done through IApp Interface but I want to understand actually how it happens.

Related

Socket for push notification

For my current web (reactJS) app, i need to implement a push notification system. Backend APIs are written in Python on Django Framework. So how should i implement socket, should I write in python, or may I write in node or node for the client-side and python for the server-side?
Are you looking for Web push or mobile app? The term push is really synonymous with 'push notifications' meaning the client will get them even if the app / website is open or not.
If that is what you are looking for then you need to be looking at service workers and push notification servers.
If you want to simply send alerts to users on your page you can for sure use a simple websocket or long poll done in JS with a node server to emit to.

Psoc 4 ble communicate with windows

I want to make an application to get my notifications from an iphone through psoc 4 ble. I'm subscribing to ANCS service, i get the notifications, and after i want that data to send to windows to a java or c# application. What I don't know how to do or if it's possible: how do I make the connection between psoc and windows to send the data.
It calls Serial Communication (UART). You will have two pins Tx and Rx and using them you can easily communicate with windows using terminal applications such as PUTTY
Does your computer have bluetooth on it directly? If so you can use the microsoft API to call it here: https://msdn.microsoft.com/en-us/library/aa916530.aspx
else if your computer does not have bleutooth, you have to use the CySmart dongle and use the C# API cypress provides here: CySmart

Can a web application use a personal phone to send a text message

I have a client who sends about 5000 SMS messages each month. They are currently doing this from an iPhone, by actually typing the message in to the phone. (I think the messages are quite repetitive, and are often addressed to groups).
The reason that they are not using an online message gateway is purely the cost. We can use a gateway here in Australia (such as Amazon SMS) for about 7.5 cents for transactional (and 2.5 cents for promotional, though I don't know if this is reliable enough).
When the client uses their own iPhone, the SMS is included in their plan, and costs them nothing extra.
I am building a web-based application for the client and the question is 'Can I send SMS via a handset connected to the client's desktop PC'. I think the answer is no, but would like to be surprised. The application is responsive, so what about if they triggered the messages from a browser on the phone? Still no?
If you could use an Android phone instead an iPhone, you could create a small gateway app on the Android that can send text messages without the need for the user's intervention.
It could work like this:
The Android app would have a simple REST interface, a good start could be https://github.com/NanoHttpd/nanohttpd.
An endpoint in the Android app could send messages, see Sending SMS programmatically without opening message app
The software on the computer would use the rest endpoint on the Android phone to send the message.
This wouldn't work on the iPhone because it doesn't allow an app to send a text message without the user's intervention.

PushSharp Vs Signal R

I used webApi for create web Service and provide Web services to mobile Android/Apple programmer. I want to send a notifications for mobile when the database has changed. I searched on the internet and found that i can use PushSharp or Signal R. Which is the best option ?
It is really depends !!
if you want Notification server for mobile app i think PushSharp is good solution it's built as Push Notification framework for mobile app it is depends on GCM (google cloud messaging API ) it's full free API from google .
I think this task is not for signalR .
signalR is a framework for building real time apps you can Implement any Scheme like pub-sub .
what i know there is a client implementation for signalr for android called :
SignalA : URL : github.com/erizet/SignalA
So if you want to send Notification to Mobile app you can use one of
those :
PushSharp
PushBots
i found pushsharp more reliable .
and has a big community .
also you must consider what your mobile app developer good at ??! .
As Khairy said, SignalR and PushSharp do very different things.
SignalR is a real-time web framework. It is best suited to real time, two-way communication between a client and a server. It requires that your client application be in constant communication with your server.
PushSharp is a push notification library. It is used to send, well, notifications. The act of sending a push notification to a client is inherently one way, and might not happen in real time.
If all you really want to do is send notifications, I see no reason why you wouldn't want to use the right tool for the job. In this case, PushSharp is the right tool for the job.

How can I run my application or some specific methods in background in windows phone

I want to run my application in background when i click on windows button.
Basically I have some methods of XMPP and when I goes to background it changes its status and presence from online to offline. I want this to be run in background.
Just because of the status is offline I am not able to receive any toast notification from XMPP.
If any one has idea about XMPP then please help to resolve this as well.
Any help will be much appreciated.
Thanks,
Nishant
You cannot make your app run in the background. I think that other IM apps use a push mechanism. So you need a server, when you app is exited, you tell the server to make the user seem still online and when a message arrives for the user, you send a push notification to the device. Whne the user taps the push notifictaion popup, your app will be started.
On Windows Phone "normal" apps cannot run continuous in background. XMPP normally requires a persistent long living TCP/IP connection during your complete session.
There are different ways to solve this problem:
1. create a app which can run in background, e.g a location tracking app or voice app
Log off when your app goes in background, you will not receive any message until your login in foreground.
Log off when your app is in background and also use a background service which log on in the interval of eg. 30 minutes and checks for new messages. But that's far away from being realtime and the idea of XMPP ;-)
Use a combination of XMPP and Push messages. XMPP while you are in foreground and Push when you are in background.
create a proxy between your app and the XMPP server and use Push. This means your app does not create the XMPP connection iself. Your app tells only your "proxy server" to login user X now. Your "proxy server" creates the XMPP connection and it can stay there 24/7 connected, doesn't matter whether your app is in background or not. Your app can communicate with your "XMPP proxy" over push or any other protocol choose.
Which solution your choose depends on your unique requirements. For chat apps like WhatsApp a background service is normally not appropriate because your messages are delayed for up to 30 minutes and your are not available while the background service does not run. While for other business apps this may be fine.

Resources