Category : onesignal

I use Unity 2019.4.16f1. I’m installing OneSignal for push notification and in the documentation, they ask to open Go to Assets > External Dependency Manager > Android Resolver > Settings and check the following: Use Jetifier Patch gradleTemplate.properties Use project settings https://documentation.onesignal.com/docs/unity-sdk-setup#step-5-android-setup When i go the the Android Resolver and click on Settings, i don’t ..

Read more

I am using onesignal and I have 2 different sound options for notifications. However, in my keep.xml, which sound I write is the only one playing. My keep.xml: <?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools" tools:keep="@raw/money_notification"/> For example, in this situation my notifications only play money sound and if I change it to bird_notification, only bird sound ..

Read more

I can’t open my app by clicking on a notification in OneSignal if the app is closed. import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; import com.onesignal.OneSignal; public class Loader extends AppCompatActivity { private static final String ONESIGNAL_APP_ID = "xxxx-xxxx-xxxx-xxxx";//my app id instead of "xxxx" @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ..

Read more

I’m developing an app in React Native and wanted to receive notifications in the app using Onesignal and Firebase, but I’m getting an error, I’ve already looked in the documentation and apparently it’s correct to use. follows the error code: useEffect(()=>{ OneSignal.init("7c7b85c7-3bd2-48e3-8c75-02835cb223c8"); OneSignal.addEventListener(‘opened’, this.onOpened); return () => OneSignal.removeEventListener(‘opened’, this.onOpened); }, []); function onOpened(openResult){ console.log(‘Message: ‘, ..

Read more

In Firebase you can subscribe user with the topic like this, FirebaseMessaging.getInstance().subscribeToTopic("weather") .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { String msg = getString(R.string.msg_subscribed); if (!task.isSuccessful()) { msg = getString(R.string.msg_subscribe_failed); } Log.d(TAG, msg); Toast.makeText(MainActivity.this, msg, Toast.LENGTH_SHORT).show(); } }); I am looking for a way to to the same in OneSignal. Source: Android..

Read more