Cannot find the Debug Tab for Azure Notifications Hub (New UI) - android

I am following this tutorial Getting started with Azure Notifications Hub for Xamarin.Android
I have everything setup for my app and now I need to send a test notification to see if my configuration is correct but the Debug tab seems to have gone missing.
Can anyone point me in the right direction ? Any help is appreciated.
Thanks!

I don't know if you're using Visual Studio but if so, you can also use the Server Explorer. Add you Azure subscription there and navigate to the Notification Hub.
From there you have all the functionality which is also available from the Debug tab on Azure.
Checking out the new portal, I think this functionality is (not) yet available.
There is however an option to go back to the 'full' Azure portal (which also implicates not everything is available yet).
Another option is to use the Service Bus Explorer, although this application has been giving me some trouble for the past few days.
This option, and all others, are described here.

Debug tab is available in old portal (for now I guess) at: manage.windowsazure.com
You can also create a postman or fiddler request containing sas token, sample here: https://milenppavlov.wordpress.com/2015/12/15/get-shared-access-signature-authentication-for-azure-notification-hub-and-create-push-notification-via-rest-call/ that can send the notifications for you.

Related

Use GCM rather than FCM

I still using Eclipse for development. I used to use GCM for push notification and just realised that Google introduced FCM while ago. I have problem to setup FCM jar files on Eclipse. Tried to use Google's Youtube video on Github to import libraries but still have problem with that and I prefer to get back to GCM if it is still available. I searched but didn't find the GCM Console anymore. Just wonder if anyone know what can I do ??
Turns out that you can still use google-console.
Go to this link to create a new project or see projectId of available projects: https://console.developers.google.com/iam-admin/
Then you can add credentials for this project or you can go to this link to see availabe projects and their credentials: https://console.developers.google.com/apis/credentials/
You will see something similar to below image. In yellow box you can choose your project name. You can create a new credential by choosing the blue box.
Also note that you can choose your key to be unrestricted which gives you the liberty to use it in different applications, or you can restrict it to be more secure.
I don't believe you can create new projects with GCM.
I recently setup an app with push notifications but I was unable to use GCM and had to create a new Firebase project to be able to use FCM

Android app: logging on the device

I'm still fairly new to Android coding. I've made lots of use of the Log.d() function in my code to display lots of handy logging messages to the logcat console within the Android Studio environment, when I run the app with the device connected to the computer (or on an emulator).
Now I'd like to be able to get debug information from a user when the app is running on their device, hopefully showing the same Log.d() messages that I see in the logcat console within Android Studio.
I've done some searching but can't seem to find a straightforward guide as to how this is achieved.
Thanks.
You have to use a web server. First send the content of logd() to your server and then check them on your server. However, you may want to test your own apps instead of asking users to test. Google developer console has a place to show some debug information if your app crashed when users are using them.
You can use a webserver, file-backed logger, or any other way of saving/submitting data on the fly.
Most people will recommend either some form of integrated web service like HockeyApp, etc., but you can get it done just by sending a plain old text file if needed. FYI, not best practice, but it gets the job done.

Understanding aspects of Google Cloud Messaging - basic setup

I have an android application that is designed to receive push notifications via GCM. When I initially designed the application, I used a "deprecated" tutorial (merely because it was one of the most in-depth I found) and my dev phone was running API 2.4, so I was able to get the service up and running without much issue.
Now, my development device is running Android version 4.4.2, so my goal is to "upgrade" my application to handle GCM properly for all devices (for now, lets ignore the fact that I'll have to differentiate how to handle Push Notifications depending on API level).
I attempted to follow the Android Developer tutorial for creating a demo client app for Google Cloud messaging, which can be found here. https://developer.android.com/google/gcm/client.html
While I hate to sound like I want to ignore to smart coding practices, this official walk through was a little big in terms of scope (My application supports Phonegap, and while I think implementing native GCM is much easier than using the PushPlugin for Phonegap, I don't want to handle more than is absolutely necessary in my Java code)
As a last ditch effort, I simply downloaded the demo gcm code from the source they provided here: https://code.google.com/p/gcm/source/browse/samples/?r=1ca8e646c517310e2d46a6a6eda74106b8084fc5
I attempted to import the gcm-demo-client application, and although I know my SENDER_ID, I don't understand anything about the SERVER_URL. The documentation provided by Android Developers talks very generally about HTTP vs. CCS, and I'm struggling to grasp where this server fits into the grand scheme of all that is Google Cloud Messaging.
Assuming I download the gcm-demo-server project directory they included (which seems to be some kind of Java Project), how do I host it? My previous deprecated GCM simply used a basic android application in which I would submit a form containing the device Registration Id, and a message with a title and context. Unfortunately, I can't figure out how to import their demo-server into Eclipse (since Eclipse doesn't think it contains ANY project files), AND I cannot seem to understand how this server connects with my application in any capacity.
TL/DR Summary of questions:
1.) How can I go about "hosting" the gcm-demo-server from URL #2 above?
2.) If I can just copy the Registration Id from my client app to the clipboard, can I just use my "android server" application to send my messages?
3.) Maybe it's just me, but I don't see anything resembling a Receiver class in the gcm-demo-client project directory, only a GcmIntentService. How can there be an intent when the application can't even properly handle messages?!
Thank you for your patience and help!
(P.S. - I cannot provide any code- however since the code in question is merely the provided Android Developer GCM demo code, this hopefully won't be a big issue)
1) There are many companies that offer server hosting services. You should choose one.
2) If you copy the registration Id manually, and hard code it in an application that serves as a "server", you don't need to host a real server, though that would only work in development. In production, assuming you'll have multiple users who install you app, you'll need a real server that receives and stores the registration IDs of all of them.
3) The demo client project you are referring to is old, and relies on a deprecated library (gcm.jar) which contains a default implementation of the BroadcastReceiver, which receives the messages from GCM server and starts the intent service. If you refer to the current demo app, you'll find a BroadcastReceiver class.
The demo app might not work because it is a gradle project and you should preferably open it in Android Studio. That might be why it could not see it as an Android project at all.
I have recently started implementing GCM myself and it is not difficult at all. I am using AppEngine for holding the backend part of my app. In Android studio, there is a very quick and easy way to generate both the android client and the backend part including the cloud endpoints and even a web interface for sending the messages (you don't need to use it though).
I followed this tutorial https://github.com/GoogleCloudPlatform/gradle-appengine-templates/tree/master/GcmEndpoints
Maybe this is not a fully satisfying answer for you, but I found the code very much readable and I understood how this stuff works.

What tool to send push notification to android phone?

I need to test the C2DM service. I have already implemented the service in my Android app. Before starting coding the third party server which gonna send the notifications i would like to test my app.
Is there any tool working on Windows (preferably with an UI) which allow me to enter the registration_id of my phone , the account used into C2DM and a message.
I'm looking for a jar or an exe , don't bother to propose php or any web server based script , i can't install any server or interpreter on the computer which have access to internet :'( .
Thanks
C2DM is now depricated.
Use Android GCM http://developer.android.com/guide/google/gcm/gs.html
Finally build my own command line tool based on this article . Probably faster than keep searching a ready to use tool.
I got this to work to run as the server in VB http://www.androidsnippets.com/vbnet-server-side-code-to-send-c2dm-messages
Seems to work nicely, hopefully that's the direction you were talking about.

Remote wipe data using Device Administrator Application+ android

I am working on android device policies, i am able to implement wipe data, force lock using sample given at below link
http://developer.android.com/guide/topics/admin/device-admin.html. I am not able understand how to wipe, force lock, change pwd Remotly from server. I spent lot of time in searching to get information but i am not suceed. Please give any information to implement policies Remotely.
Thanks in advance.
I've googled around a bit today as well, and I've come up with the following solution:
First, write a device administrator app, like the one referenced in the link you provided.
Then you will have to implement some technique so that you can push messages from a server to the android client. As of Android 2.2, you can use C2DM (Cloud to device messaging) provided by Google, I guess it isn't to hard to configure and get going. If you do not want to use this, there is the option to use some other kind of messaging framework, that allows you to push data, like XMPP or MQTT. The facebook messenger app for iOS uses MQTT, so that can't be all bad. It will however require more work setting up, than C2DM for example.
Finally you will have to push some kind of message from your server to the client via the method you chose and let your device administrator app listen to these messages and respond with the correct action, depending on message. So you can decide on your own what the messages will look like and contain.
There is also the option of using Exchange, but I do not know how that works.
So that is basically what I found out from my little research, I'd love to hear other ideas from someone else as well.

Categories

Resources