Is there a solid push notification solution for Xamarin that can work properly for China as well as global? - xamarin

I am developing a mobile app for both iOS and Android using Xamarin. This app is intended for global users. I got the challenge finding a working solution of push notification service that can work for both and for China as well as the rest of world.
Here's the things I have explored/tried -
Firebase Cloud Messaging (FCM) - obviously it does not work in China because the connection to google api is blocked.
Azure Notification Hub - for Android part it is still leveraging FCM. So it doesn't work. Although there is an option for it to use Baidu push service. But there is no Xamarin SDK support. This is a dead end for me.
Pushy.ME - It supports only Xamarin.Android project. I don't find any reference for Xamarin.iOS.
I probably can combine Azure Notification Hub (for iOS), and Pushy (for Android). But I'd like to see if there is any better idea or workaround in one single solution.
Looking forward to brilliant minds.

I ended up using Pushy for Xamarin.Android and Azure Notification Hub for Xamarin.iOS. Although this made things a little bit complex in both apps and my backend.

Related

Struggling to find good Examples of iOS app clip & Android instant Apps

I've searched for examples of iOS app clip & Android instant Apps but could not find more than few examples.
I am looking for released apps in App Store/Google Play or open source examples.
good examples could make developing these new features easier and gives developers new creative ideas to use these wonderful tools.
Do you have an app that utilizes App clip or instant app?
How did this affect your app?
What is the challenges you have faced?
Note: I know this is not a typical question but it need to be asked in a community full of great developers who love to share knowledge with others, and I don't think there is a better place than here.
Intro
I know it's been 10 months since you posted the question but I just stumbled upon it now... I've developed an app called ARShades for both iOS and Android that allows the user to try glasses on via Augmented Reality and I'm still in charge of development. The app supports both Instant App and App Clip, although I'm facing troubles making the the app banner show for the App Clip.
Firebase issues
As far as I can tell developing App Clips is a tad harder than develeloping Instant Apps, I'll tell you why. The main apps for both systems make extensive use of Firebase Firestore and many other features. This isn't a problem on Android where sockets are supported across the board, while on iOS they are only supported in the main app, so I had to use REST API to read and write data on Firebase when developing the App Clip, it's been a nightmare since it was the first time for me dealing with REST APIs (I just finished yesterday and published the update).
App Size
Another issue I faced is related to reducing the app size. On Android I had to remove all the unused images and compress the remamining ones. On iOS I had to separate the asset catalogues between: used only by the main app, shared, and used only by app clip. And of course I went through some compression works there too. I forgot to mention that I developed a new app as Instant App on Android, while you cannot do the same on iOS since it must be in the same project.
App to site linking
Another insidious part was the linking of the site to the apps. I managed to do it on Android by making changes to the manifest and specifying the host, while I can't seem to find a way to link the App Clip to the site in ay way. I've done everything the documentation says. I've put the apple app site association file in the .well-known folder but nothing, no banner shows up. I'll keep working on that.
Edit: Everything is now solved.
Conclusions
So, to sum up, I've found Instant Apps better on the developing and hassle side of things, the support sockets, hence the full suite of frameworks the full apps have. I hope I kind of answered your question, although I think you have documented yorself elsewhere in these past 10 months XD
Links to Android: https://play.google.com/store/apps/details?id=it.spaarkly.arshades&hl=en_US&gl=US
Link to iOS: https://apps.apple.com/us/app/arshades-demo/id1586661818
Link for trying Instant App / App Clip

Xamarin Apple Watch Extension - Consuming simple JSON Web Service

I've built a simple Xamarin.forms app which connects to a web service and gets one piece of data and displays it.
I wanted to do the same on an apple watch (targetting a series 2 apple watch) but I just don't understand how it works.
I've added the watch project and the watch extension, created the interface... Got a "refresh" button which changes the value of the label to a hard coded value but I want to get the data from a simple web service on app startup on wake and when button is activated (similar to my xamarin.forms iphone app)
I've tried using the classes that I use on the forms app to get the data but I can't reference them. I've tried using httpclient and that doesn't work.
After googling it appears I am suppose to use a HandleWatchKitExtensionRequest delegate in the phone app to get the data in a dictionary and then display the data. I haven't been able to find any really simple examples of this, but I'm confused because since apple watch version 3 the watch has been autonomous with cell access and therefore it doesn't have the host app necessarily.
So what I'm asking, is can the watch actually consume a web service alone using a xamarin phone app and if so, is there any simple examples because I can't find any (that aren't from 2015).
Sorry if this is vague, or I sound like a newbie (I definitely am a newbie when it comes to xamarin but any pointers or help would be appreciated)
According to https://developer.apple.com/documentation/foundation/nsurlsession?language=objc NSURLSession is available since watchOS 2.0. It is used to download the content from the web and is extensively documented just don't search for watchOS specifically as it is the same on all Apple OS.
But as HttpClient uses NSURLSession it is also available, so, maybe you need to add the reference to System.Net.Http.
When I was last developing for the watch I noticed that HttpClient would never work. I had to use NSUrlSession, so this is what helped me.
Hope this Helps

Will be there an OneDrive SDK for tvOS in the near future?

I wanna develop a tvOS app that is able to connect to atlas one One Drive folder. If I use the CocoaPod it tells me, that this version of the SDK is not targeted to work with tvOS.
Will be there an OneDrive SDK for tvOS in the near future?
I'm not alone, the related Github issue got at least one thumb up.
OneDrive API is primarily JSON over HTTP. This should be straighforward enough for you to consume using normal HTTP calls.
If your app's competitive edge relies on accessing OneDrive (for example, you're competing with Arq Backup), you'd probably be better off writing your own network calls using NSURLConnection or similar.

What's the easiest way to make a real-time chatting app with Xamarin?

I'm trying to figure out a way to create a real-time chatting app with Xamarin and some kind of backend technology. How can I do it?
I have a better solution. The above-mentioned technologies(buddy SDK & SignalR) will require you to integrate and handle everything by your self. Instead, you can go for CometChat SDK, which has real-time chat along with Audio/Video chat functionalities. Also, you can use its ready-made UI inside your application. It is the easiest & quickest way for you to make a real-time chatting system. For more information on CometChat you can refer to the following link:
https://developer.cometchat.com/docs/xamarin-forms-quick-start
As mentioned by ChristiaanV, SignalR is the way to go.
The Performance is great with Xamarin, we delivered more than 150k messages within 2 hours without any problems regarding the connection.
With Azure Mobile App and ServiceBus, you can easily scale out your backend, as described here http://www.asp.net/signalr/overview/performance/scaleout-with-windows-azure-service-bus
Have a look at SignalR, it's a good and easy to use framework to do realtime 'things'. They also have a Xamarin Component which is free to use.
https://github.com/SignalR/SignalR
http://components.xamarin.com/view/signalr
Please note that I personally don't have experience with using it on mobile devices, so I can't tell you anything about how it's performing battery / performance wise.

Chrome ARC, Android -- ways to make paid apps?

I've recently posted my Android app to Chrome Web Store using ARC Welder, and wondering about how I can make it a paid app.
Currently, for Android, I have a free version and an "unlocker" as a separate app on Google Play. The user installs the free version first, and then if he/she decides to "go pro", he/she purchases and installs the "unlocker" which talks to the free versions and activates it into "pro" mode.
So my questions:
When packaging an Android app with ARC, it runs on its own, so there is no way to have a second app ("unlocker") running in the same Android "sandbox", correct?
Is it possible for an Android / ARC app to access "purchased" state via Google Play APIs, say for checking if the user purchased the "unlocker" app on Android?
I assume that the answer is "no", at least for now:
https://developer.chrome.com/apps/getstarted_arc
Since ARC is in Beta, it doesn't support all of Google Play Services yet.
However, here are some available APIs:
Auth (OAuth2)
GCM
Google+ sign-in
Maps
Location
Ads
I don't see licensing APIs here.
I found these links on monetizing Chrome apps:
https://developer.chrome.com/webstore/money
https://developer.chrome.com/webstore/payments-iap
Even if this also applies to Chrome OS (not sure), it seems to require JavaScript coding to talk Chrome Webstore APIs. Is it possible to access those from inside the Android ARC sandbox?
Are there better options that I'm missing?
None? Should I just wait until Android ARC is fleshed out more and hope that it includes support for paid apps?
The direct answers are:
1) You can bundle up two APKs so they both run in the same sandbox. But only one of them is launched as "your app". It is free to then launch or otherwise use the second APK as it sees fit.
2) But as you noticed, there is no way to easily check for a purchase/license right now.
Your best bet may be to wait for the Google Play Services license APIs to be implemented.

Resources