How to make customization in cordova plugin? - hybrid-mobile-app

I want to do customization in push-notification plugin.
I have installed different push-notification plugins but doesn't works:
https://www.npmjs.com/package/cordova-plugin-push-notification
https://github.com/phonegap/phonegap-plugin-push
https://pushwoosh.gitbook.io/platform-docs/pushwoosh-sdk/cross-platform-frameworks/cordova/integrating-cordova-plugin
(For Phonegap: phonegap plugin add pushwoosh-pgb-plugin
For Cordova: cordova plugin add pushwoosh-cordova-plugin)
Actual results: Image is not showing in push-notifications.
Expected result: Image should be there while receiving push-notifications

You can do customization in Plugin using "PluginName".java file.
You may find the "PluginName".java from
(Project Folder)Root -> Platform -> android (os name) -> app -> src -> main -> java -> [plugin package] -> "PluginName".java file
Now you have to do your own code as per the requirement. Just like your problem of image in push-notification, you can do appreciate code for showing images in this file.

Related

Where can I get Appium compatible iOS app file for my iOS project?

I am developing an iOS native application and I need to get the .app file which will be compatible with Appium to perform test automation.
From where can I get that?
Thank You.
I have found the location of .app file which will be compatible with Appium in-order to run automated tests.
/Users/<Username>/Library/Developer/Xcode/DerivedData/<AppName>/Build/Products/Debug-iphonesimulator
One more option,
You can archive the project and once archived please follow the below steps,
Xcode -> Window -> Organizer -> See your archived file -> Right click to get the location -> Right click on archive file -> Show Package Contents -> Products -> .app file

How to test an Android Auto App

I downloaded the API Simulators for the Android Auto Apps as it is said in the docs but I do not see it appearing on the categories of the AVD Manager. I am doing something wrong / do I have to do something else in order to test an App that I created for trying it out?
Just go to the your SDK folder -> extras -> google -> simulators and install the "media-browser-simulator.apk" in the device you want to test your app and Voila.

Cordova App -> iOS archive validation failed. Icon missing

I'm trying to upload an iOS app I've developed using Cordova, but, when trying to archive I get this error:
What icon is missing and where should it go? (I have prepared a 72x72 px. icon)
PD: If you could tell me what name should it have would be great.
EDIT:
Here's what's inside my icon folder:
If you built your Cordova project with the Cordova CLI, you should have an icons folder inside yourProjectFolder/resources. There you can find several default PNG icons with the Sencha logo on it, all of them have different size and are named accordingly (for example, there is one called Icon~ipad.png which happens to be 72x72 px). I beliebe this is where you whould put your custom icons for them to be packaged with your app.
EDIT 1 : I thought the Sencha build process would have packaged the content of this resources folder (at least the needed icons) to the targeted platforms resources folder under the cordova folder but apparently you've done it right so I guess all you can do now is dig into the cordova folder. You should try : yourProjectFolder/cordova/www/resources/icons (or maybe yourProjectFolder/cordova/www/img) or somewhere inside yourProjectFolder/cordova/platforms/ios (but having little experience with the ios platform using Cordova I can't think of a particular folder).
EDIT 2 : I made some tests and you indeed have to add the icons manually inside each platform folders within your cordova folder. For example, to add icons for an android app, go to cordova/platforms/android/res and add your icon.png file (with the right width and height, specific to the targeted platform) inside each drawable folders. Then launch a build for your targeted platform (cordova build android) et voilĂ  !

how to add plugin without cli in cordova 3.5.0 iOS

I am not using cli for my cordova project ,i got the cordova 3.5.0 project from there site and integrated with my project.All the custom plugins created by me is working fine.But the API's like device is not accessible.I have added the CDVDevice to config.xml but still i can't able to access the device object.
So please help me to solve this problem.
In order to correctly working the Cordova requires you to have cordova_plugins.js file near the cordova.js. That file contains registration of the JS API.
The easiest part is use Plugman to install plugins inside your custom project, that way, it will handle all work on creation of cordova_plugins.js.
Official Cordova documentation for the Plugman
See the possible related answer Cordova 3.5 embedded webview with plugins where I put more insights about how you could modify cordova_plugins.js in case you desperately need this, but I would recommend you to use Plugman.

phonegap FBConnect Plugins some steps troubles

I started developing the iphone app using phonegap >>
I have used phonegap before for android app>and also fbconnect for android but for ios I am not able to configure it>> I gone through many tutorials and Questions from stackoverflow>
I am following this tutorial
https://github.com/davejohnson/phonegap-plugin-facebook-connect/
and every things goes right but the steps 11 to 14 >> and last ios URL SCHEME
thats are the steps which are confusing me aND I AM UNABLE TO COMPLETE THat steps>>
and if I compile without thats steps>>
its giving the following error>>
error: Cordova/CDV.h: No such file or directory
#Geeniewanted :: this is the screen
For 11. If you click on the top-level 'phonegapFacebookApplication' in your project navigator (with the blue x-code project icon to it's left), that should show you all the project settings on the main center window. There you will find a tab that says "Build Phases", and within that, you'll find an option to add Link binaries with Libraries. #Geeniewanted has nicely written out a solution to that above.
I should warn you though that if you're using the lastest PhoneGap Build, or Cordova, you'll notice that there isn't a Cordova.plist anymore. That is because with PhoneGap 2.3.0 they've changed that to the 'config.xml'. And so you'll have to add your plug-ins to there.
I would recommend that you follow the video tutorial from Facebook-Dev to set up your Facebook iOS SDK within x-code: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/#project
you can use the following link to use the childbrowser plugin and facebook
http://www.drewdahlman.com/meusLabs/?p=88#comment-1544
it's possible to update this to the new inappbrowser

Resources