This is my first post here so please excuse my mistakes.
I am trying to work with Nearby notification. I have added the beacon via "beacon tools" and from my dashboard have added nearby notification. As you can see in the picture, the new notifications are appended at the bottom.
Nearby notification dashboard_img
So in this case, "Title #3" is the latest and that's the one I see in Nearby app when I am next to beacon.
Now, when I tried adding Nearby notifications to my beacons via Proximity API.
I have added the beacon to my project, and I am using
gapi.client.request
to add an attachment to my beacon, using the Proximity beacon API. The add attachment URI:
https://proximitybeacon.googleapis.com/v1beta1/beacons/(BeaconName)/attachments
I am formatting the attachment as such
{
"title": "Example",
"url": "https://www.example.com"
}
When I added 3 notifications via this (one at a time of course), they do show up in my google dashboard for that beacon. But the new ones are stacked on the top, instead of appending at bottom(as seen in the second pic)
Nearby notification dashboard_img
So as you could guess, only the first added notification is visible via Nearby, i.e "Title #1"
Am I missing something here? How do I make the new notifications appear using Proximity API?
PS: I am using Eddystone UID for this.
Update
It seems this was a bug and I had been trying to contact Google in several ways. Finally it reached them and they fixed it today :)
So latest notifications are now automatically displayed & targeting works well.
Kudos to Google engineers working on Nearby!
Related
I am trying to use beacons in my project. Facing some issue with it.
I am getting NearBy notification only for WebURL. I tried using it for AppIntent and FreeFormAppIntent using beacon dashboard but I am not getting the nearby notification from a beacon.
I had given schema as "Something" and package as "com.google.android.gms.nearby.messages.samples.hellobeacons" via beacon dashboard.
Please let me know the above AppIntent given data is correct!!
Please let me know what went wrong??
You can find an example app intent used for Nearby Notifications here: https://developers.google.com/nearby/notifications/attachment_data_format
Also make sure that the app you want to launch can handle the intent you specify.
Please look at the Signal icon in this screenshot:
My question is how to obtain the same result in a Codename One app. Suppose that my app has a variable like "int unreadMdg", how can I show the number of unread message in the app icon?
We currently only support this on iOS as it wasn't available on any Android device when we launched the feature and is still arguably flaky on Android.
For iOS support you can set the badge value via push notification (see the developer guide) or by using the API:
if(Display.getInstance().isBadgingSupported()) {
Display.getInstance().setBadgeNumber(unreadCount);
}
This is for IOS
Use this to make it displays a specific number
// Objective-C
[UIApplication sharedApplication].applicationIconBadgeNumber = number;
// Swift
UIApplication.shared.applicationIconBadgeNumber = number
I am working on a Telegram client (not a bot) plugin for an app to send messages in background to a bot. For this I am using the newest TDLib Api. All is working fine, when I already initiated a chat with the official Telegram App, where I searched for the Bot by name and started to communicate with him.
The problem is, that I don't know, how to search for a Bot over the Api. Or maybe there is another way to get the information to start a chat with a bot?
I found the solution:
First search for the bot by name:
TdApi.SearchPublicChat(mPrefs.getString(PreferenceKeys.BOT_NAME, "")
Then send the start message to the bot:
TdApi.SendBotStartMessage(mPrefs.getInt(PreferenceKeys.BOT_ID, 0), mPrefs.getInt(PreferenceKeys.MY_ID, 0), "" + System.currentTimeMillis())
I have registered a beacon and attached data using Google Proximity API. Next, I have written a test Android app to listen for beacons and subscribe messages created in my dev console. I have followed all steps documented here and here. The issue is that the onFound callback is never called.
#Override
public void onFound(Message message) {
Log.i(TAG, "Found message: " + message);
}
API info here
Do I need any specific permissions within my AndroidMannifest.xml?
I have only added a com.google.android.nearby.messages.API_KEY meta-data attribute in my manifest.
I faced the same problem while I used Estimote Beacon. It appears by default it comes up with 'iBeacon' profile.
Based on my personal experience, iBeacon is not detected by NearBy API. I tried changing the beacon profile to 'EddyStone-beacon' and it started detecting.
Can you try changing the beacon profile to EddyStone and try?
You'll need to subscribe to the messages for the beacons via attached data namespaces and types — all done via filters. This is documented here at Google developers
One other key to not miss is that you must set the result callback with setResultCallback. Not setting seems to mean that your callbacks won't get called all the time.
I'm using the nearby messages API without problems. I find this google example very interesting: https://github.com/googlesamples/android-nearby/blob/master/messages/NearbyDevices/app/src/main/java/com/google/android/gms/nearby/messages/samples/nearbydevices/MainFragment.java
Remember to change your subscribe options and set the strategy in this way: Strategy.BLE_ONLY
In your manifest you have to add only the Key, but rememeber to enable NearbyMessages API in your developer console.
I have two questions regarding Google Cloud Messaging:
(My push script is PHP, and my client is Corona SDK.)
PUSH ICON: Currently, my push messages are displayed on the screen with an icon that looks like an inverted triangle with an exclamation mark inside. How do I make it show my own icon? (Can I dictate the icon from the server, or must this be done on the client?)
GROUPING MESSAGES: Currently, if I send three push messages to the phone, they are shown individually in the push list, whereas in other apps, subsequent push messages all replace the previous one, so they only take up one place in the list. How do I accomplish this? Is this the collapse_key value?
Thanks!
First of all, you should have specified "Google Cloud Messaging" (or C2DM in case) in the title of this thread, rather than "Android Push"...
1) If you don't set any custom icon, devices borrow, I don't know why, icons from other installed apps (the icon of Google Talk, sometimes). You can set your own icon from client with the following code:
String app_name = context.getString(R.string.app_name);
int icono = R.drawable.ic_stat_notify;
long time = System.currentTimeMillis();
Notification notification = new Notification(icono, app_name, time);
And you should follow the official Android Design Guideline to design that custom icon, usually designing three versions of the icon (one for devices running v2.2, another for devices running from v2.2 to v3.0 and another for devices running from v3.0).
2) Yes, that's exactly the collapse_key purpose.