How to get a count of the push notifications using react-native-firebase - react-native

I want to set the count of the badge per hand in react-native with firebase.
firebase.notifications.setBadge(number)
how to get the number?

you can use firebase.notifications.getBadge(), like described in the Docs: https://rnfirebase.io/docs/v5.x.x/notifications/reference/Notifications#getBadge
But I wonder, it doesn't seem to be the total of received messages. I think the Idea behind this is, that you add (and increment for each message) an setBadge to your onNotifications.
But the question at all (I think thats also what the Thread-Opener means), how do I get the total number of received messages per app. It should be possible, because it's still used in Android:

RN-Firebase >= v6
The above answer was for RN-Firebase v5.x Since v6.x, some notification functionality was removed, to keep only the basic one. In the documentation they point users to a seperated Library named Notifee.
So you'll find the getBadge-Replacement here

Related

Performance of adding tracking category options using Xero API

I'm trying to add ~20 tracking category options programmatically and I've seen that calls to add the first two values returns in < 1 second, but after that calls timeout.
If I restart with a new session, I see the same behavior (first two calls are quick and then calls timeout).
My question is, is there rate limiting on the Xero API? Has anyone seen behavior similar to this? Workarounds or fixes?
UPDATE: I forgot to add that i did look at rate limits posted by Xero, I'm not anywhere close to any of those limits
I think xero API give you the option to save a bunch of tracking categories within one request

Can I count the calls in iOS? If yes how? and If it's restricted by Apple what will be solution of it?

I am stuck somewhere, I am building an application, where I want to total numbers of calls (stats) only, No Call Duration, No Number, No contact Name... Just total numbers of call, is there any way which doesn't breach apple development policy.
because accessing call history data is not allowed, is there any event which can tell us the call count, or any services which shows specific status at the time of call so we can get the status of active call and number of calls by adding them in sum.
Please have a look of my query and give me best possible answers on basis of the same.
Regards,
Andy
Unfortunately no. There is no API for that.
The information you seek is located in the Call History Database (call_history.db)see this wiki. This file is very useful in forensics but cannot be accessed on a non-jailbraked iphone using legit means. More information here and here.
It is however, under certain conditions, possible to detect the start of a call: see Detecting the call events in ios on SO. You can also check the Core Telephony Framework Reference. This will give you ways to access some call informations, such the unique identifier for the call. That may be enough for you to count calls.

How to get reposted tracks from my activities?

Using the Souncloud API, I'd like to retrieve the reposted tracks from my activities. The /me/activities endpoint seems suited for this and I tried the different types provided.
However, I didn't find out how to get that data. Does anyone know?
Replace User Id, limit and offset with what you need:
https://api-v2.soundcloud.com/profile/soundcloud:users:41691970?limit=50&offset=0
You could try the following approach:
Get the users that shared a track via /tracks/{id}/shared-to/users endpoint.
Fetch the tracks postet by this user via /tracks endpoint, as the _user_id_ is contained.
Compare the tracks metadata with the one you originally posted.
I am not into the Soundcloud API, but taking a close look at it seems to make this approach at least as technical possible, though e.g. fetching all tracks won't be a production solution, of course. It's more a hint. Perhaps reposting means something totally different in this context.
And the specified entpoint exists in the general api doc, so I don't know if you would have to extend the java-api-wrapper for using it.

Rally: Pull stories counts by schedule state for a release?

I'm trying to pull from the API of story counts for the latest release, broken down by schedule state. There's a report that does that currently, but I don't see any exposed method in the API. Does anyone know if that's possible to obtain?
You should be able to do a query for each schedule state, and grab TotalResultCount from the body of the response. For example:
https://rally1.rallydev.com/slm/webservice/1.31/hierarchicalrequirement.js?query=(ScheduleState = "Defined")
https://rally1.rallydev.com/slm/webservice/1.31/hierarchicalrequirement.js?query=(ScheduleState = "In-Progress")
and so on. Since there are only four "built-in" schedule states, plus an optional one before Defined and an optional one after Accepted, it's at most 6 requests.
You can further filter down Alan's examples above with some release information as well by changing the query parameter:
query=((ScheduleState = Defined) AND (Release.Name = "My Release"))
Are you writing an app using the App SDK or using one of our other REST toolkits (ruby, .net, python)? You may be able to find some better code examples here:
http://developer.rallydev.com
You might also try the Batch Query approach that allows you to just return the size of the query instead of counting the results. See the
"Getting the Size of a Collection" example of the api doc:
https://rally1.rallydev.com/slm/doc/webservice/batch.jsp#example8

Get A Users Over All Retweet and Mention Counts using Twitter API

We are working on some analytics using the amount a user is retweeted or mentioned... I can't seem to find a way to get these numbers using the apis does anyone have any ideas?
https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name={screen_name}&count={count}
it's important to include the line include_entities=true to the request. This will give you an expanded response including re-tweet and mention counts.
Get Status / User Timeline
Twitter API Console
Update:
to get tweets from the last 90 days, there is a Node.js library you can use called Snapbird
https://github.com/remy/snapbird
.. and here is another resource covering the same topic.
http://blog.tweetsmarter.com/twitter-search/10-ways-and-20-features-for-searching-old-tweets/