Phonegap build, push notification icon does not appear - push-notification

I was looking at this question:
Phonegap Build , App icon does not apear
However, the solution posed is to target an older version of the cli. We'd rather not do that, as it is limiting. Is there a better solution to this that will work with cli-6.5.0?

You have to downgrade your version
android-targetSdkVersion to 20.
In your config.xml file
<preference name="android-targetSdkVersion" value="20" />
may be your version is "23". And android doesn't support icon in 23 version.
So you have to change from 23 to 20 in your android target sdk.

Related

Xamarin forms Android project TargetFrameworkVersion Error after update to Xamarin Forms 5

I just updated to Xamarin Forms 5 and now I cannot compile my project. I get the error message
The $(TargetFrameworkVersion) (v9.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0). You need to increase the $(TargetFrameworkVersion)
However, as you can see from the screen shot below, my Target Framework Version IS 10. What am I missing??
That's actually very easy.
First, go to the Android project and right-click it.
Properties>Application>Compile using Android version(Target version).
Change that to Android 10.0
Then go to the Android Manifest option below the application option.
Change the Target Android version to 10 as well.
This should solve it.
Goodluck
Revert in case of queries
One of my students was using Visual Studio 2019 for Mac and had a similar error.
I shared this link with him. After reading the ideas above, he figured out his solution.
Below is what he told me.
Hi Harlan, thanks! That link helped me find the answer!
FYI: first I downloaded the Android 10.0 SDK.
Then I right clicked on my Android project, went to "General" and
updated "Compile using Android version: (Target Framework)" to Android
10.0 (Q).
Then I went to the AndroidManifest and updated the Target Android
version to 10.0. Then boom, no more build errors! I guess it didn't
like 9.0!
I had been pulling my hair out trying to fix this, thanks again for
the link!

Sdk is missing the Android Support Repository

I'm trying to make a app with Gluon mobile but i'm not able to make the Android version work.
I try to download the SDK directly from android but the SDKManager will not open.
After some research I find that SDKManager is not support anymore.
I install Android studio, but the Support Repository is now obsolete.
Anybody know how I can make it work?
I change my JavaJDK to 1.8 instead of java 11 or 12 but still nothing.
Thanks
Jc
The Gluon Plug-in won't deploy to Android with gradle task androidInstall as the Android SDK is missing "Android Support Repository" which is no longer available with current versions of Android Studio, but the androidInstall gradle task console-log outputs a DOS command-line showing how to download it.
Something like:
C:/Users/.../Android/Sdk/tools/bin/sdkmanager "extras;android;m2repository"
(the above is described in the link mentioned earlier by José Pereda)

How to integrate firebase in an Ionic project (android/iOS)?

I am reading articles and testing ways to implement analytics and push notifications in my Ionic app using firebase.
My ionic app targets both android and ios platforms, so where do I place the google-services.json firebase file? Do I have to create an 2 apps within firebase if I need to use firebase for android and iOS?
I am reading many articles some of which say root folder, whereas some mention to put it in the apps folder. Some say we have to then update the config.xml to include the foll:
<resource-file src="google-services.json" target="app\google-services.json" />
I have also read that we need to update the gradle file with application and project level dependencies.
I have put the file in platform/android/app folder and things are working correctly now.
I just want to know what is the best practice when using Ionic and Firebase, where do I place the file and what config changes do I have to make?:
For an Ionic android app
For Ionic iOS app
For Ionic app for both android and iOS platforms
Have a look at the documentation of the firebase plugin :
https://github.com/arnesson/cordova-plugin-firebase
For Android, you have the google-services.json file, and for iOS you have the GoogleService-Info.plist file. These files are required by firebase to work on both iOS and Android. You have to place theses files at the same level as config.xml.
This plugin uses a hook (after prepare) that copies the configuration
files to the right place, namely platforms/ios/\/Resources for ios and platforms/android for android.
So you don't need the resource-file directive in your config.xml, since it is copied automatically.
You don't need to edit the build.gradle file, but If you have other google play plugins installed (like maps or admob), the compilation may not work.
Your build may fail if you are installing multiple plugins that use
Google Play Services. This is caused by the plugins installing
different versions of the Google Play Services library. This can be
resolved by installing cordova-android-play-services-gradle-release.
If your build is still failing, you can try installing
cordova-android-firebase-gradle-release. For more info, read the
following comment about locking down the specific versions for play
services and firebase. It is suggested to use + instead of 15.+ to
ensure the correct versions are used.
EDIT : Since you're using cordova-plugin-firebase-analytics and not cordova-plugin-firebase, it seems that they didn't implement any hook to copy the files. You'll have to place these directives in your config.xml :
<platform name="android">
<resource-file src="google-services.json" target="app\google-services.json" />
...
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
...
Be sure to install cordova-support-google-services

Visual Studio Apache Cordova - IOS build rotation issue

I'm a starter in writing app code in Visual Studio 2013 Community Apache Cordova and have managed to connect VS2013 with my Mac. Once I have gone through the process of building the app in VS and on my Mac and installing in on my iPhone, I open it up and it won't rotate. It doesn't rotate for a number of basic apps that I've written nor does it rotate if I build the default new project "Hello, your application is ready!" app.
I have done some research and tried changing the config.xml "Orientation" preference to "both", through the code window and also in the designer window but that doesn't change anything. I've also noticed that adding in a "BackgroundColor" preference doesn't work either.
Does anyone know if I may have configured something incorrectly or perhaps need to add something to my code?
All the HTML, JS and CSS that I've written seems to work okay (with the exception of trying to link URLs to the Safari Browser but that's another issue).
I have noticed the same issues. I tried finding some settings to fix that in the config.xml, but was not successful. I have resolved myself to just opening the iOS project in XCode and changing a few things:
Device Orientation: no matter the config.xml setting, its always only Portrait. I click-check the other 3 orientations.
Team: I have multiple developer profiles, and I need to choose correct one here.
Bundle Identifier. I screwed up one project, and have different case for iOS and Android. I leave the VS one as the Android one, so I can build completely correct for Android. Since I know I have to go to XCode for iOS anyway, I change the bundle identifier here.
You can find the project using Finder at ~/remote-builds/builds/9999/cordovaApp/platforms/ios/*.xcodeproj, where 9999 is the build number, though not necessarily the latest, largest number, but the latest datetime of the folder.
You can also refer to Greg's answer in this related post as an alternative solution.

How to use iOS SDK 4.2 with Xcode 4.0.2

I installed Xcode4.0.2 yesterday and attempted to build and run a project developed by someone else, who was using an older version of Xcode (3.2.5) and iOS 4.2.
By default it seems, Xcode sets the project's "Base SDK" to 'Latest iOS (iOS 4.3)'. When I try to change that, my only iOS SDK options are "iOS 4.3" or "Latest iOS (iOS 4.3)". On my machine (Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs) I have "iPhoneSimulator4.2.sdk", as well as one for 3.2, 4.0 and 4.1.
In the Base SDK dialog, I tried choosing "Other..." to set the SDK to something other than the 4.3 options listed. Instead of getting a list of additional installed SDKs I get a text area where I need to manually enter an SDK. I tried "iOS 4.2" but I don't believe that worked.
Why isn't the list of available SDKs being populated with all the ones on my machine, and how can I set the SDK to 4.2?
Thanks!
Mat
You will want to select latest SDK, and then if you want the product to work on an earlier version you will want to select iOS Deployment Target, you can go all the way back to 3.0.

Resources