I have written a phonegap application, and it performs a pretty simple task, it gets some JSON from a YQL link, and then displays it nicely to the user. This works excellently when I run it using Google Chrome on a Desktop, but, my client tells me that it does not work on his device which is Android 2.3. What can be going wrong? I'm using phonegap build to build to app, and they tell me that it is given internet permission, but, when my client puts the APK on the phone (its not on the market yet), does he need to do something special for it to access the internet?
Thanks a lot,
Dhaivat
in phonegap, allow external host : Open phonegap.plist -> external host and add your url or * to allow all
within the phonegap app the webapp runs under the file:// protocol - this might affect things.
you should test this at least on an emulator yourself - clients usually screw up anything some might screw up when testing ;) best would be to test on an actual device tho.
I'm not sure if this will help but I had a similar problem testing my app here:
https://stackoverflow.com/questions/17496104/json-wordpress-feed-not-appearing-in-android-studio-emulator-using-phonegap
I needed to change access origin to ="*"/ in my config.xml
Related
I'm making a desktop app version of a website with electron. The desktop app itself works, but the google sign in does not work because "this browser is not secure."
Opening the sign-in page in a secure browser will not work here because i did not make the actual sign-in version itself, I am only making the desktop app version.
I've seen other posts where they say to change the userAgent, but Google has disabled that, so it will not work.
I also have used a solution with nativefier app --userAgent..., but the Windows and Linux versions become messy with a bunch of extra files after building. I would like to get a single .exe file for Windows and a single .AppImage or .deb file or similar for Linux if possible.
If you have any solutions or workarounds for this, please let me know. Thanks!
I managed to log in with Google using this package: getstation/electron-google-oauth2. This package will open a browser window for the log in, then successfully pass it to Electron app. There are examples in the readme demonstrating how to make it work.
Also make sure that you configure a desktop OAuth 2.0 Client ID for the app:
I've just started learning ionic framework. It uses web browser capabilities for building apps.
These capabilities namely HTML, javascript and CSS are client side stuff. Which on browsers can be seen with view source.
My questions is how will be the visibility of the source? Will the end user be able to see the source of the app?
If yes, is it normal for any app? Shall one be worried about the security of the source?
The visibility of the source in chrome://inspect#device , is pretty much the whole application. And no, end user cannot see the source of your application once you set and push the project to production mode.
Well, since you are developing a hybrid application, there are of course, pros and cons for each. Security might not be as strong as native apps, but development time is greatly reduced to push the app to different platforms.
If you would to do something would requires high security and non-visibility of your source , then native is the way to go. As for hybrid apps,if you need somewhere to store your data securely, you will need plugins to communicate with native platform's secure storage which might pose a security risk. But then again, even native applications can be de-compiled. The way developers tries to make it harder is via obfuscation methods.
Once u set your application to production mode, you will not be able to inspect your application anymore.
To show your web-app on chrome://inspect/#devices :
1) Make sure your web-app is running and your phone is plugged into your computer via usb with USB debugging on and your PC is trusted by the phone.
2) Under device manager, you should not have missing phone drivers. (it would look something like this)
3) ADB should not be running co-currently. And you should be able to see something like this on ur inspect page:
4) Click on inspect button and you're done! (:
You have a signed apk, when you install it on a device and inspect the device on google chrome the inspect option will not be available. Theres an easy way to do that decompile the signed apk using apktools you will get the AndroidManifest.xml file. simply add android:debuggable="true" to the tag and recompile it resign it and you will be able to inspect it. If you check the main.js file in the inspect section the source code is visible.
Hence you can use Jscrambler to prevent this (Its a paid service i too am new to it)
I have been doing a lot of reading and studying to figure out.
I basically just want my main AngularJS application to run, but also include an embedded Chrome Extension app - in this case, have regularly scheduled alarms (using the chrome.alarm API).
I want all users of my AngularJS app to have automatic access to the Chrome extension app, embedded in the main clientside one with lots of other Angular features.
It seems like I have to manually enable my Chrome app in Developer mode on my browser and even drag my Chrome app specifically to a location in my Chrome browser. I don't understand how end users can just automatically use my Chrome app then.
I need to add here I have never really used jQuery, only AngularJS but AngularJS extensively. My AngularJS app is the frontend, the backend is provided by Rails.
Some advice would be really helpful. I hope I am not downvoted as it is strange how sometimes questions get downvoted and I am not sure why...I don't really know where else to go with this question.
EDIT:
Ok some code to demonstrate:
myangularapp.controller('myappcontroller', function($scope, $http) {
var delayvar = 5;
chrome.alarms.create("arandomalarm", {delay: delayvar});
};
This doesn't just work as part of my AngularJS, I tried creating a manifest.json file in the app/assets folder too. As well as a background.js file there and my-chrome-app.js file. "chrome.alarms" is undefined, but I haven't enabled Developer mode yet. But still, how are end users supposed to use it if just to make me use it I need to do so much specific browser configuration?
You should have a look at Content Scripts and then at Message Passing which explains you how to communicate between a web page and an Chrome extension.
its not possible to automatically install a chrome extension. the user must install it from the chrome store.
you may make it easier for them to install it by providing an inline installation from your webpage. its in the official documentation and you can see an example on this page with the "add to chrome" button:
http://plusfortrello.com (one of my chrome extensions which has inline installation inside that page).
that example button is further customized to display a message instead if the user is not on chrome desktop.
if your extension also has permission to your webpage then you can also detect from your webpage if the extension is already install it (to hide the button, send messages to it and such).
I have website link at which I have designed a html/javascript web app. I used iOS and Android app to create an app that encapsulates the web app.
Is there a way to block access to the website link and only allow access to the website link only thru the native apps calling the link.
In short safari, IE, Chrome must not be able to access the link, but the iPhone & Android app should be able to access it.
Is there some way to tell that the app is accessing the site and not the phone or pc browsers.
I am sure there a number of ways to implement this.
Thanks,
It depends on how is the web app implemented. Since native Web Views are pretty much the wrapper for the standard browser (Safari/Chrome), you will find it tough to filter it based on that.
What you can do, however, is to add an extra GET variable (for ex. &ref=youruniquecodehere) or a custom User-Agent, based on which you will be able to identify, whether your application authorized the request (with a proper access code) or if it's a generic request using browser.
However, both of these options can still be bypassed if researched, although it'd require slightly more time. Not sure whether a solution that would work in 100% of cases exists.
Hope that helps, please correct me if I'm wrong.
Let me first start out by saying I know how to use the iOS SDK so please don't answer this with a "just use the SDK." I want to know WHY google analytics is not working.
Here's my setup. I have a web app that is also baked into an android app and ios app via webview. I'm using cordova. The android app works just fine with the GA JS code. The web works just fine. However no events or page views are showing up from iOS. I've heard that GA is tied to the domain so does an iOS Webview do something under the hood to the domain?
I was going to attach my code snippet but it's coffeescript in a few classes so I'll just paste the compiled js
Analytics.prototype.track = function(args) {
window._gaq.push(args);
};
Analytics.track(['_trackEvent', 'SubscriptionModal', "Closed", data]);
This works fine in web and android so it's not a JS. I'm setting the GA _setDomainName to 'focusatwill.com' and can see that both ios and web have a domain of 'www.focusatwill.com'
I've read online a few people talking about this issue and everyone says just use the SDK. I'm looking for the reason why it doesn't work. How do you fix it to use the JS?
edit
I should mention that the html and JS are not baked into the device, ie they don't have a local url but are served up from our webserver
Safari on iOS6+ blocks third party cookies by default, and I'm certain that webviews do too.
Check that you have something similar to the following in the init method of AppDelegate.m:
NSHTTPCookieStorage* cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
[cookieStorage setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
That's from the standard boilerplate generated by Cordova 3.0.9, but might not be present if you're using a version that predates iOS6. It sets the app-specific cookie policy, which should override the system default.