So, when I went to https://chromestatus.com/features I noticed in the url bar app it said install app. When I clicked it it install a chrome web app with the website in it. How would I be able to implement this in my website?
I tried going through the source code of the website and didn't find anything useful.
When you hover over it says install. It is the button right next to the bookmark. I don't know if this is an experimental feature since I'm on chrome canary. But I still want to implement it into my website. Is it possible to do it with java script?
I believe it is a Progressive Web App and Chrome is testing the plus button UI for the add to homescreen behaviour.
To do this for your website you'd need a web app manifest and a service worker. See here for more info.
Sorry for the question.
I'm current creating Phaser games for mobile using web browsers.
I can remote debugging on my android device using Google Chrome Browser of my android device also similar to Mozilla Firefox Browser and check if any error in javascript/html/css using the desktop developer tools of the browser.
Here is what i follow to use remote debugging for chrome
https://developer.chrome.com/devtools/docs/remote-debugging
Here for Mozilla Firefox
https://developer.mozilla.org/en-US/docs/Tools/Remote_Debugging/Firefox_for_Android
Already installed Android SDK
I'm currently developing on windows platform.
Using XAMPP
But i want to test now my app on the native browser of android phones gives me hard time to do it. and don't have any idea on how to do it.
If anyone has done it before.. Kindly please share knowledge on how you to do it and make it easy and comfortable for yourself to remote debugging native android browser.
thanks in advance
Ok, this will only work if you have a local version of the website deployed... and your phone must be connected to the same network.
For reference, I used this website: http://www.broken-links.com/2013/06/28/remote-debugging-with-weinre/
First, you'll need to install NodeJS as weinre is a NodeJS app.
After you install Node, you can use NPM to install weinre.
npm install -g weinre
Then you start weinre server on your local machine
weinre --boundHost -all-
Then paste the following code in your webpage that you want to debug. Change your_private_ip to the private IP of your local server. It probably starts with 192.168.x.x.
<script src="http://your_private_ip:8080/target/target-script-min.js#anonymous"></script>
Now on your desktop, go to http://localhost:8080/client/#anonymous to see a WebKit-style web inspector.
You should see something like this:
Now you can use the other tabs like the Console to view the javascript console, or the elements to look at their styling, etc... just like on chrome or firefox.
I don't know if you still need help, but for those who are having this trouble can try this, it worked for me:
Do the exact same thing like you were to debug from google chrome, in the "chrome://inspect/#devices" tab look for this: WebView in com.android.browser (Version/4.0 Chrome/30.0.0.0) (in my case, i'm using a huawei p7)see image
Sorry for my english
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.
Problem:
I'd like to try building a proof-of-concept app using the Samsung SmartTV SDK 2.5 (I have a 2011 model TV - UA55D8000).
Unfortunaltely, the SDK comes in two varieties that only seem to work on Microsoft Windows. It's weird because there's no reason it should be the case: the televisions themselves run Linux and applications are written in JavaScript.
This presents two problems:
As I don't have Microsoft Windows at home, I can't use the build environment (nor the TV emulator) that come with the SDK. (The SDK files themselves are just JavaScript)
Even if I had access to Windows, it's very hard to automate building & testing of the Apps without access to traditional build tools (e.g: Make, Ant, Autotools, etc)
How can I build Samsung Smart TV Applications on Linux? (i.e: without using the Windows-based build tools that come with the SDK)
What I've figured out so far:
From what I can gather, a JavaScript-mode application is simply zip file containing an XML config file, one or more JavaScript files (including supplied JavaScript interface libraries for platform SDK functions), and any required assets (HTML, images, etc).
Also, from what I gather, deployment involves placing the zip file and an XML manifest file on a web-server network accessible to the TV, logging in as 'develop' on the TV and 'syncing' the application to the installed applications on the TV.
Could someone point me to a source for the full deployment requirements & app bundle requirements? Or even just a working sample?
I've had a reasonable amount of success setting up a development environment on my Ubuntu machine and I'd like to share my methods here for anyone looking to do the same. This answer is intended to be platform independent, so the same advice should work on any fully fledged operating system.
Introduction
First off, the question's assumptions regarding app structure are correct. A JavaScript application consists of the following items:
config.xml, a simple configuration file defining various settings and deployment information. See Writing the config.xml File on the official developer site.
widget.info, a very small file with a few lines used to define the opacity of the application's body. This may not be required for full-screen applications.
index.html, the main HTML file for your application.
Images, sounds and other resources.
You can write these files using your favourite editor. I'm happily using vim with linting plugins for my JS and CSS.
Testing
As of version 4.0 of the SDK, a Linux version of the emulator is now available. This allows you to test your apps as they would appear on 2011-2013 TVs. For older TVs, you can run SDK 1.5's emulator in Wine, but emulators belonging to SDK 2.0 and newer will not run.
It is possible to run the emulators in a Windows virtual machine, and, with a little bit of trickery, you can make the emulators use your own application folder to look for apps. This involves sharing your development folders with your virtual machine, then creating a symbolic link to those folders, replacing the "apps" folder inside the SDK's installation directory. A quick overview of this process is available in an article titled, Your Windows IDE sucks? Replace it with Your Favorite Editor on the Mac!
Deployment
Samsung Smart TVs have a built-in developer account that allows you to send an application over from your computer for live testing on the television itself. You enter the IP address of your deployment server and the TV will look for a file called widgetlist.xml on that server. An example of the format is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<rsp stat="ok">
<list>
<widget id="MyTVApp">
<title>MyTVApp</title>
<compression size="3383543" type="zip"/>
<description>A basic application for Samsung TVs</description>
<download>http://192.168.1.83/Widget/MyTVApp_0.1_America_20120709.zip</download>
</widget>
</list>
</rsp>
After that, it will download each app listed using the URL in the <download> tag. All you have to do is zip up the files, modify the widgetlist.xml accordingly and make sure both files are hosted in a web server running on your machine. You can use Apache, lighttpd or anything. I have a small node.js/connect app that will build the widgetlist.xml dynamically based on the zip files I have in a directory labelled deploy.
So there you have it. Development of Samsung Smart TV apps is not impossible without Windows. In fact, there's quite a few options available. Hooray!
They have now released Smart TV SDK 4.0 which includes support for Linux & Mac OS X: http://www.samsungdforum.com/SamsungDForum/NewsView?newsID=27
"In addition to the Eclipse-based App Editor, a new Linux-based Emulator has been released.
This Emulator executes in an Ubuntu virtual machine that is run in the Virtual Box virtualization tool."
■ Features for 2013 Platform on Linux (First Release)
Apps Framework
App Engine / WebKit
UniPlayer
SEF (Service Extension Framework)
You need to register to Samsung D forum and then you can download the SDK from https://www.samsungdforum.com/Devtools/SdkDownload
One tip that I have not seen mentioned in any of the answers, is that the TV will attempt to open a socket connection on port 45634 of the machine where the app was downloaded from (the one with the widgetlist.xml).
All debugging (alerts() calls), will be sent over this port, allowing for remote debugging.
I use NetCat to open a port and dump all logs, like so:
nc -l 45634
I've created this Answer for a topic that I know nothing about, but nevertheless I did spot something that threw a red flag in my direction... bounty or not.
First, I looked at your WineHQ Bug Report to see if this issue was resolved, but it's still pending as of this writing. I noticed that bug report had a reference link to the discussion which I clicked and followed.
Looking at the machine-code generated dump-error in that discussion proved informative.
Reference:
Z:\home\andy.wine\drive_c\Program Files (x86)\Samsung\Samsung TV
SDK(3.5.2)\Emulator\Emulator2012_v3.5\bin\Emulator2.exe
The above Path is the location of the file that caused the dump. That path is the red flag I mentioned.
Let me back up a tiny bit and explain about what I learned about Windows XP SP3 and IE8 which very well may apply here, or you can skip down to the line with the bold text.
I worked on a webpage project that used a lightbox plugin called Shadowbox. That project wasn't on a local server, just in a subfolder of a subfolder. It works fine in Firefox and Chrome but IE choked and didn't render any CSS from the plugins style sheet. Because I was very familiar with Shadowbox, I was 100% convinced it was not the plugin. So I started to think outside the box, and through trials and tribulations I discovered the culprit was just the actual path!
I had created a subfolder for the project that used /test(v1)/ in the Path and that's what broke IE8. Once I removed the parentheses, the CSS was loaded correctly. This same solution was also the cause of a CSS issue for a forum member who used Vista and IE9, so then it's conceivable these issues lie with Wine as well.
What issue is that? It's using illegal characters, the parentheses, in the path name. I will stop short and say the URL name only because it's the file path leading to the index.html file (and only relative paths were used in coding - parentheses could not be escaped - and base tag failed).
Firefox and Chrome were forgiving, but not IE. Even though you may not be using IE, it's possible that this issue extends outside of that.
My solution is not to use parentheses or whitespaces in any portion of your file path. While this may not solve this particular bug, at the very least you will not have sandbox Wine issues for when that file path becomes a URL path for whatever requirement (e.g., accessing a SWF object to be used as a video player). If IE browsers are unforgiving, so too can other embedded browsers or programing modules.
Recommended:
Z:\home\andy.wine\drive_c\Samsung\Samsung_TV
SDK_3.5.2\Emulator\Emulator2012_v3.5\bin\Emulator2.exe
Notice the above does not use the Program Files (x86) folder since that can't be changed per OS requirements. Having such a path will surely reduce, if not eliminate, any unforeseen errors. Cheers!
I know it's an old question, but since I'm delving into the process, I figured I'd share some links. Enjoy!
Decent quick start guide on developing for the Smart TV platform: http://www.samsungdforum.com/Guide/c02/index.html.
These are the minimum project requirements and some example files: http://www.samsungdforum.com/Guide/art00011/index.html.
For people who like doing everything with command line, smarttvjs (http://smarttvjs.org) has made it very easy:
$smarttvjs init #create sample project
... do some development (IDE
is nor required)
$smarttvjs build samsung (create a package for
samsung)
$smarttvjs run samsung #launch simulator
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