cordova

Modify notifications in Phonegap and Pushwoosh

旧时模样 提交于 2020-01-25 21:12:11
问题 I'm currently working on PhoneGap and Pushwoosh and have some questions: Is it possible to change the text / icon of the notification in the status bar? If yes, is it also possible to show the notification only when you have received some specified data? 回答1: You will need to modify SDK for that as this functionality unfortunately is not available out of the box. If you don't mind doing some Java coding it would be rather easy. You might need to modify this file: https://github.com/shaders

Phonegap native app, submit form through PHP mailer on live server

佐手、 提交于 2020-01-25 20:20:06
问题 I am trying to process my form through a live server from my native app without leaving the page. Below is the code I am using for the form, the JQuery and the PHP, but when i send it, the page goes blank and puts the string in the URL bar. Can I get some help with my code please. I shortened the form on this to make it easier to read, i have alot of other fields as well. Do I need to have them all listed in the javascript? HTML on Form <form action="http://mobile.koolantkoolers.com/mailer

Cordova onActivityResult is called immediately after startActivityForResult with RESULT_CANCELED

给你一囗甜甜゛ 提交于 2020-01-25 20:19:12
问题 In the code below, when onActivityResult is called immediately with RESULT_CANCELED. As suggested in other answers, I have added setActivityResultCallback just before startActivityForResult() and PluginResult#setKeepCallback(true);. But nothing is helping out. Any suggestion? .... public boolean execute(String action, CordovaArgs args, CallbackContext callbackContext) throws JSONException { this.callbackContext = callbackContext; if (action.equals(ACTION_OPEN)) { if(PermissionHelper

Saving the application state on cordovas pause with angular

家住魔仙堡 提交于 2020-01-25 20:14:27
问题 I've got a Cordova app running on my Android device to show some news retrieved from a web service. As I'm using Typescript and Angular I've got a service holding my news like so: class NewsService { news: News[]; } I'd like to save those news on Cordova's pause event, so I built a service to do that, injected it into my NewsService and added an event handler with a corresponding callback: static $inject = ["$http", "newsApp.LocalStorageService"]; constructor(private $http: ng.IHttpService,

Ionic - How to detect and pass value back to original view with $ionicHistory.goBack();

谁说胖子不能爱 提交于 2020-01-25 13:09:50
问题 Using ionic, I am trying to have a use case to select from a list and return back to the original view with some value. I'ved already done most of the part except detecting it has returned to the original view and passing a value back to the original view. Here's so far what i'ved accomplished: button that goes to a list <button class="button button-block button-outline button-positive" ng-click="performselectUnit()"> Select Unit </button> this is the trigger to go to the new view with the

How to achieve “Remember Me” functionality for both local and remote login pages?

泄露秘密 提交于 2020-01-25 12:17:31
问题 I have a requirement in my application for iOS and Android, developed using IBM Worklight, to remember the user ID if the user selected this option. I can achieve this by using localStorage, but the issue is that I have two login pages: One is placed within the application, and the Second is hosted on a remote server Depending on the conditions the application will meet, either the remote login page will be displayed or the local login page will be displayed. If I use localStorage on local

Is it too much to ask to have an invisible button on jQuery Mobile?

夙愿已清 提交于 2020-01-25 11:51:26
问题 I struggled with this for a while, so figured I'd put the answer on here. How can I have an invisible button on jQM? 回答1: Create the button using this tag - <input type="[yourchoice, mine was submit]" id="[yourchoice]" data-role="none" /> The crucial part is the data-role="none" . This means jQM ignores it, so when you use $.hide() , you're not left with a random empty blob of rendering on the screen. 回答2: In my case I can't receive click event on submit by pressing the "go" button if input

How to distinguish between mobile app and browser?

自古美人都是妖i 提交于 2020-01-25 11:43:08
问题 My question may sound like "already asked", but I cannot find any answer. My problem is : I have a phonegap app that only display a remote website (that website is responsive and work perfectly on mobile device). So the app is very simple : function onBodyLoad() { document.addEventListener("deviceready", function(){ location.href = "http://www.mydomain.com/"; }, true); } As you can see this I just a redirection when that app starts. With that method I have no access to phonegap API after the

Google Maps: ReferenceError: google is not defined in cordova android application

允我心安 提交于 2020-01-25 06:47:25
问题 I'm trying to create a cordova project that marks some locations in map and getting the distance in between the selected location and current location of the user. I have used cordova-plugin-googlemaps for displaying the google map and used cordova-plugin-googlemaps and for getting the distance netween the selected location and current location of the user I have used the code from google map distance matrix service I am getting ReferenceError: google is not defined when I run my cordova

Ionic 4 - Dismiss or close Modal on platform hardware back button android

吃可爱长大的小学妹 提交于 2020-01-25 04:03:25
问题 In ionic 4, on hardware back button press I want to close or dismiss any modal that will be present. I have used the below given code, here the condition "if(modal) { modal.dismiss(); }" always get satisfied even if previous modal are dismissed constructor(private platform: Platform, private modalCtrl: ModalController) { this.initializeapp(); } initializeapp() { this.platform.registerBackButtonAction(1, async () => { const modal = await this.modalCtrl.getTop(); if (modal) { modal.dismiss(); }