vknow360
(Sunny Gupta)
December 5, 2023, 11:35am
42
Do you know how to use it with android 12?
not actually, please show me blocks. thank you
vknow360
(Sunny Gupta)
December 6, 2023, 2:40am
44
See first post at the top.
vknow360
(Sunny Gupta)
December 9, 2023, 8:43am
45
ChangeLog Version 3
There was a minor change needed to send notif to all subs which I have done in v3.
Credits:
opened 04:05PM - 18 Nov 23 UTC
closed 04:32PM - 28 Nov 23 UTC
### How can we help?
I am unable to send push notification to Subscribed User… s from API but notifications can be sent from dashboard.
Error I am getting:
`{"id":"","errors":["All included players are not subscribed"]}
`
Code I used:
````
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
JSONObject object = new JSONObject();
object.put("app_id", "8c6cbe1c-****-****-****-c861915cbc4c");
JSONArray array = new JSONArray();
array.add("Active Users");
object.put("included_segments", array);
JSONObject object1 = new JSONObject();
object1.put("en", "Hello World!");
object.put("contents", object1);
JSONObject object2 = new JSONObject();
object2.put("en", "Hello!");
object.put("headings", object2);
System.out.println(object.toJSONString());
RequestBody body = RequestBody.create(mediaType, object.toJSONString());
Request request = (new Request.Builder()).url("https://onesignal.com/api/v1/notifications").post(body).addHeader("accept", "application/json").addHeader("Authorization", "Basic <API KEY>").addHeader("content-type", "application/json").build();
Response response = client.newCall(request).execute();
System.out.println(response.body().string());
````
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
https://drive.google.com/drive/u/0/folders/14JIpANok8Uxvy8Ae97J38VA1CJKt3yMw
1 Like
does it woks now for firebase auth?
vknow360
(Sunny Gupta)
December 13, 2023, 11:55am
47
No, neither I have any plans to make it compatible with Firebase Auth.
Since I have published firebase auth+storage extension of my own.
1. Introduction Description: This extension uses latest Firebase Storage SDK [20.2.1] and Firebase Auth SDK [22.2.0] to integrate its features in your app. You can easily do these operations: upload file download file list files delete file get...
Reading time: 5 mins 🕑
Likes: 32 ❤
So it is better for me to make an ecosystem to be independent of 3rd party platform.
Carpe_diem
(Carpe diem)
January 25, 2024, 3:52pm
48
Hello Thanks for your valuable support. I’m new to codes. Which one should I use in my application? There are multiple plugins here. v2 v3 etc.
Carlos3
(Carlos)
January 31, 2024, 2:47pm
50
PlayStore notified me of this when I tried to submit the update for my app with co component. I don’t have Android 13, but from what I saw in the playstore notification, the extension causes the app to crash. Any solution for this?
vknow360
(Sunny Gupta)
January 31, 2024, 4:42pm
51
Carlos3:
I don’t have Android 13
Does it mean app working fine on Android 12?
Carlos3
(Carlos)
February 1, 2024, 7:04am
52
As far as I’m testing, yes, it’s only on Android 6 that it didn’t work. I haven’t tested it on Android 13 yet
vknow360
(Sunny Gupta)
February 1, 2024, 7:43am
53
I have android 13 and extension works fine.
What other extensions are you using?
First make sure your issue in only because of this extension.
As soon as I put an extension in my app and don’t execute any function, the app crashes. (exported as apk)
In the companion view I then get the following message:
Error from Companion: java.lang.NoSuchMethodError: No static method getDebug()Lcom/onesignal/debug/IDebugManager; in class Lcom/onesignal/OneSignal; or its super classes (declaration of ‘com.onesignal.OneSignal’ appears in base.apk!classes4.dex)
vknow360
(Sunny Gupta)
February 7, 2024, 5:28pm
57
Oh, sorry.
You haven’t added OneSignalDeps aix to your project.
You need to import and add push v3 and deps v2 aix.
vknow360
(Sunny Gupta)
February 7, 2024, 5:35pm
59
Extension doesn’t work in companion.
I think Location Sensor component is reason. Remove it then try.
now it’s working. the app no longer crashes.
But now I’m still wondering how to set it up so that users can receive a message directly.
In the end, it should be the case that users receive individual messages
I finally got it done. Thanks for the help
1 Like
Can anybody help me? What’s wrong with my blocks? the push notification does not reach the device