I'm using Ionic v4 to create an app that is able to receive notifications (by topic) by using the cordova-plugin-fcm-with-dependency-updated plugin.
At this moment everything works as supposed on IOS. I receive a notification and when I click on it, the onNotification event gets triggered and it redirects me to the app, on the page that I selected.
However, Android does not work like that. I would expect the same behavior as mentioned above, but for some reason the app is openend, but the onNotification event does not get triggered. I had some console.logs and alert placed inside, but none of them showed.
I then read the I had to add the click_send parameter to the notification body, with value FCM_PLUGIN_ACTIVITY.
Now this will give me an even more strange behavior: I do receive the notification, but clicking on it, will not even open the app! Also nothing in the logs...
Can anybody help me out here, I'm getting lost!
PS. just updated every npm package to #latest...
Apparently, all that had to be done was:
ionic cordova platform remove android
and:
ionic cordova platform add android
to refresh things.
Now everything works as expected...
Related
First of all I am completely a beginner in android native code, I started with flutter app development. My problem is with the implementation of push notification. I want to Fetch data from the socket API continuously in the background and use the data to show as push notification when my FLUTTER APP(NOT ANDROID APP) is in the background/foreground/killed.
If I am not wrong I know I have to code in native android but the thing is I am unable to find an example connecting the native java code with the flutter app(NOT android app) for push notification service. I am not searching for an FCM solution. Can anyone give me an example using plugins like the work manager, that works in the background? Moreover, in my flutter app, I want to navigate to another page when the notification is pressed.The task is like whenever the socket sends a message there will be a push notification (no matter the app is running or not), on clicking the notification the user can go to a specific page of the flutter app.
I have an Ionic app which I currently serve as a web app by doing ionic serve
I have few questions about it:
By default in the served web app, it takes the iOS layout, can it be changed to the android layout instead? How?
In the android version of y ionic app when I do ionic serve --lab, some of the bottom part of the content is somehow cut off (I can not scroll till the end), however it looks perfect in iOS version. Why does this happen and how can I fix it?
When I try to make an APK out of it as mentioned in the following link http://ionicframework.com/docs/guide/publishing.html , I get a blank app on my android device. What could be the reason?
ionic serve --platform android
Are you taking in account that iOS scroll "stretches"? I mean, even when the scroll is all way down, you still can pull the content up. Maybe your content is indeed hidden (specially if you are using a footer bar. Actually, if you are using a footer bar, try to add a margin-bottom for your content equal your footer bar height.).
Have you checked if this happens when you run ionic run android? If this command works, try to run cordova prepare android before following the publishing procedure. If the command does not work, open chrome://inspect on your computer's chrome browser (with the device connected to your computer and running your app) and debug it to check if your code is being packed with the apk and/or the app is yielding some error messages.
when I use ionic serve --lab, the browser won't let me use the pull-to-refresh gesture.
When I click and drag my mouse the app doesn't react to it. I had it working this morning but then I shut down the ionic serve and after it it didn't work anymore. Code to the pull-to-refresh isn't changed.
When I use it on a device or emulator it does work.
Does anybody have a clue?
I'm testing on Chrome version 43.0.2357.124 m
I made an app for android with unity3d, and want to include chartboost into it. I imported the plugin for unity, and added an app as well as a campaign on chartboost. I also made sure that the signature and app name were put into the strings.xml file. When I tried running the demo scene, the buttons appeared, but when I tried to click them, nothing happens, not even a message in the console. What am I doing wrong?
Thanks for the help in advance!
Lagidigu
As far as I know, chartboost does not work in the editor. You will need to build to a device and use logcat to see the log messages. However their unity plugin seems to be in need of some fixing- in the meantime, email them at support#chartboost.com and they should send you a workaround .jar file that will get the ads showing in the demo.
See my answer to This Question for details about why the ads aren't showing up using the newest Chartboost unity plugin.
I think their plugin is broken because my other apps DO show ads, and i did nothing different except using their latest plugin, which also for me does not work.
I am using the Cordova official Facebook plugin and run into a weird issue...
The login process, which previously worked just fine for me, is now open in some native Android "black-screen" view without any styling.
The functionality works just fine - the authentication process succeeds, so there is a consistent connection with Facebook. The thing is, I am expecting a Facebook view instead of only the text content without any styling. Here is an example with Facebook native Hackbook app:
Tried running on two different devices - the issue remains.
Tried with cordova 2.2.0, then started a fresh project with 2.5.0 - the issue remains.
Please advice.
UPDATE:
Well, I have spent too much time on this issue, and it seems like this is the new Facebook SDK for Android.
I really wish I am wrong here, but here are examples from Facebook's flow for Android:
https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/
Also - when checking the other sample apps in the SDK, all of them behave the same. The only one that shows a Facebook page is the Hackbook, and by it might be because this app is implemented with the old API (version 2):
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
Hackbook: another sample app demonstrating a selection of Graph API calls. Note that this sample is untouched from v2.0 of the SDK, and demonsrates the SDK's backward-compatibility.
UPDATE 2:
Ok, digging a bit more into it, it seems that there is no iframe involved here, the screen can be changed as you wish with a regular android activity theme added to the activity.
Here is an example of adding one of Androids default themes to the androidMenifest.xml (you can of course create your own Faceboke like theme ):
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:label="#string/facebook_login" />