Accessing Google AAID via Mobile Browser (Javascript) - javascript

I've been searching online for sometime now and have yet to find a clear answer on this subject.
I would like to access a users Google AAID (Advertising ID) via my website when they access it using a mobile browser. I would think this would be possible with some javascript code but I have yet to find any.
Has anyone had experience with this? And is it possible to do?
Thanks!

Capturing IDFA/GAID from mobiles browsers cannot be done,
Apply this approach in native or hybrid app.
until today PWA also do not support
How to fetch device information from a progressive web app

Related

Is there an iOS equivalent to navigator.share to trigger the native share function?

We want to trigger the native share function from our mobile site (so people can see their preferred sharing channels).
All the information I can find around this topic is quite dated, so I'm wondering whether there's a more recent API that's available on iOS safari (etc) to trigger the native share function from within a web app (or PWA).
To implement that share functionality you can use Web Share API.

How can I access Android libraries from a Web Application (browser)?

My issue is simple, I want to access a library from my browser, being in this case SensorManager.
I've found that getting alpha, beta and gamma from deviceorientation event in the browser is not consequent with the device orientation itsef, meaning that it may understand different values/axys among different devices.
So how to build a pipeline from a native library (SensorManager) to my browser? Any information will be appreciated.
Best Regards.
One way I could think is by implementing a WebView in your Web Application. In that you can access any Android libraries very easily. Take a look at this
Hope this helps!!!!!!!

Windows 8 Metro and Google Analytics

Will it be possible to use the Google Analytics JavaScript library (https://developers.google.com/analytics/devguides/collection/gajs/) for the Windows Metro JavaScript based application to trace views accessed by user?
In general, if a JavaScript library you want to use is on a CDN or a server external to your app, the answer is no, as Windows apps written with HTML/JavaScript cannot load external JavaScript libraries...if you try, a security exception will occur.
Many libraries will work fine if you copy the JS file into your project and run it locally. For example, jQuery works just fine this way. I have not tried the Google Analytics library, so you might just want to test it out and see if it will work with a local copy.
Something else to consider, however, is that unlike a web site, a Windows app written in HTML/JavaScript may occasionally be offline, in which case, a library written with the assumption of network connectivity would likely not work. So in this particular case, you might not get the data that you're hoping for.
Hope that helps.
we tried http://w8ga.codeplex.com/ (w8ga) to work with GA in our win8 js app.
Currently W8GA seems doesn't support html/js. Also I have no idea why developer didn't mension it( it's supports only c#/xaml metro app )
So, we found another way to do it; Look for cobra Tab 's answer at the bottom of this page: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/f81ebbb9-d711-40f1-8a82-9aed44e2d8fe/
And finally, we are waiting Adobe's Omniture sdk:
http://microsite.omniture.com/t2/help/en_US/sc/appmeasurement/winrt/index.html#Developer_Quick_Start
Hope these answers helps...
We're using the free version of markedup in our applications with great success. In addition to simple page views it shows you some app specific numbers like number of installs, exception details, etc.
I'd recommend using the Google Analytics SDK for Windows 8 and Windows Phone. It is built as a WinRT component and therefore supports both JS & Xaml Win8 apps.
Full disclosure: I am the author of this SDK; I built it for my own app and decided to open source it. There are other frameworks out there but AFAIK, none of them support the new GA universal analytics protocol so they only work with older GA properties and don't support all the cool new features GA recently added just for apps.

Cross-platform Mobile App with HTML5

I was asked to provide a tablet application with HTML5/JS/CSS which does not have dependency on any platform. Requirements:
Cross-platform mobile/tablet application
Offline capability and Storage (it should work in lack of internet connectivity and be able to synch after get connected)
Real-time data (it should be able to show any small changes from sensor values)
I should be able to connect to a CAN interface and get sensor values and ECU data. Because I have not come up with any solution for this part, I am thinking about Bluetooth. However, HTML5 doesn't support Bluetooth.
I'd appreciate to give me some vision if HTML5/JS/CSS can deal with this requirements (especially with Bluetooth)
Another question is that is it possible not to use any frameworks such as PhoneGap, RHoMobile, .... and just develop cross-platform app with raw HTML5/CSS/JS and have all requirements?
Have you looked in to PhoneGap / Cordova yet?
You can easily create cross-platform mobile applications using HTML5, JS and CSS.
http://phonegap.com
The built-in API provides access to most of the device's native features and functions. You can manage offline storage using localStorage or SQLite databases, and can detect network connectivity statuses to determine if you are offline / online and what level of connection you have (Edge, 3G, 4G, WiFi). With a combination of those, you could manage your data synchronisation.
As for bluetooth, the PhoneGap API doesn't support it out of the box, but it is highly extensible so developers can create their own plugins for missing or required functionality.
The community is awesome and many of the plugins have been compiled into a central repository on GitHub: https://github.com/phonegap/phonegap-plugins
I know that there is a Bluetooth plugin for Android available on that repository.
You can also write your own plugins quite easily to add any extra features that you need:
http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-android.html
http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-ios.html
** EDIT **
You posted an amendment to the question afterI'd written this answer mentioning PhoneGap. The honest answer is no, without a framework that interacts with the native device functionality, raw HTML5, CSS and JS would not be able to deal with bluetooth etc.
No, you cannot. A pure web application is not able, and will likely never be able, to use bluetooth.
HTML5 Bluetooth and Audio
Having developed a Web App before, I can tell you that anything involving offline has to be simple, and using device hardware is out.
Check out the frameworks, you may be able to get something to work. But it may just be a better/more realistic bet to develop a Native Application from the get go.
After a lot of searching I came up with MoSync which is a cross-platform SDK and is intended for developing different mobile applications. I believe MoSync can be the best answer for this question since it is really a rich SDK (C, C++, HTML, JavaScript) and has great tools and community that try their best to help you.
For further information I encourage developers to check here or visit their websites.
Most of the future mobile apps will be developed using HTML5. HTML5 standards are getting adopted very rapidly and those standards are supporting phone features like GPS, Accelerometer, Camera, Storage etc.
I will recommend you to use PhoneGap if you want to use any device features.

Calling android native APIs from javascript functions of embedded WebView

I am blackberry developer and I don't have any experience in Android programming.
I am trying to create an android application which will have webview/embedded browser. I will load some web page with some javascripts in embedded browser. There will be some buttons on the page which will call javascript functions. Some of these functions require access to native APIs (eg Camera API). Is it possible to call native api's from javascript functions or access to native code of the app ?
Right now this is possible in blackberry platform using Javascript extension. I'm expecting something similar in Android.
Thank you.
Anyone who is looking for the answer, I've found solution based on #dtanders answer.
Check this out:
http://developer.android.com/guide/webapps/webview.html#BindingJavaScript
Use http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String) to expose Java interfaces to the JavaScript running in the WebView
Well, if you specifically want the Camera API, it can be done. From your JS code, you can call a piece of Java code which will in turn trigger the Camera App, take a picture, return the image's URL, which your Java code can forward it to a JS method.
See:
http://developer.android.com/guide/webapps/index.html
http://developer.android.com/guide/webapps/webview.html
Its a complete shot in the dark on my part but these might have some useful information for you.
Webview not responding to touch events
Does Android support click events in its WebView?
Also don't forget that WebViews have javascript disabled by default you'll need to explicitly set it to true in order to make it work.

Categories

Resources