I'm trying to develop an application based on Spring MVC for mobile device. Spring Mobile do provide such features to view our application in mobile browser. But how can I run/deploy the application in emulator since it's non-android based application? Also if can anybody tell me, how can I test it in real device, It will be highly appreciated.
I'm using DHTMLX touch framework for javascript as well as HTML5.
Just a snippet of code below for spring mobile:
#RequestMapping("/detect-device")
public #ResponseBody String detectDevice(Device device)
{ String deviceType = "unknown";
if (device.isNormal())
{ deviceType = "normal"; }
else if (device.isMobile())
{ deviceType = "mobile"; }
else if (device.isTablet())
{ deviceType = "tablet"; }
Since you're not actually developing a mobile app (which would be installed on the mobile device itself) but a web page that detects and supports mobile devices, you don't need an Android emulator.
What you do need is a browser that allows emulating a mobile client - Chrome has a neat Device Mode & Mobile Emulation which is a part of the standard Dev Tools. The Chrome Developer page has a nice overview and a tutorial; all you need to do to get started is to click the tiny smartphone icon in the developer tools panel.
Haven't investigated Firefox, but I'm assuming there is at least one plugin that offers similar functionality.
Related
I cannot find much recent information on this topic. Does anyone know if there is any way to both fire an Android Intent (any Intent) and listen for an Android Intent being broadcast within a HTML/JavaScript application running inside a regular Android web browser, such as Chrome?
We currently do this in our HTML/JavaScript web applications using Cordova and an Android Intents Cordova Plugin and it works perfectly. But we would like to move away from Cordova and back to using regular mobile browsers.
We are currently running our web apps on Zebra laser scanner Android devices via Cordova and the Intent fire/listen is to interact with the Zebra laser scanner. This is what we want to replace via standard Chrome web browser instead.
Anyone know if there is any possibility at all to fire/listen for any Android Intents from inside Chrome?
And yes, we are very familiar with the Zebra Enterprise Browser which would handle this situation easily (without Intents), but that is not free and we have a huge amount of Zebra devices, so that option is out at this point due to cost.
Thanks,
Brendan
Im looking for an screen-capture or screen-sharing API, which i can implement into my webapp.
Goal:
I render a webapp with flask on a raspberry and access it with an android tablet (chrome browser).
Now want to share my tablets screen (webpage) via internet, and view it in the browser of the pc.
i tried this example https://github.com/di/screenshare , but its working only locally i guess.
Or is this adaptable to share my browser of the tablet with the www?
Somebody an idea how to this?
As of today WebRTC's Screen_Capture_API is not available for mobile, though you can receive screenshares from desktop.
Browser compatability for Screen_Capture_API:-
The Screen Capture API is what you would need to use to capture a screen shot from a Web browser. It is available in Chrome.
I am testing this simple piece of code coupled to an equally simple node.js server script:
<script>
var connection = new WebSocket('ws://materiali.c-s-m.it:9090');
connection.onmessage = function (message) {
alert(message.data);
console.log("Got message", message.data);
};
</script>
to the objective of inserting it into a phonegap app. When I connect to it by a standard browser it works with Chrome on Windows and on the Windows phone and Android (it shows the pop-up and the access is registered on the server log), but not on the iPhone both with Safari, Chrome and the PhoneGap app.
I have divergent information about WebRTC support on the browsers. Some founts report its support by WebKit integrally, others not at all.
What is the real situation, how may have it working on the iPhone and more importantly on the PhoneGap app for all the platforms?
By installing Crosswalk by Cordova the service now works both on WindowsPhone and Android by means of the PhoneGap developer app. Unfortunately it does not work on iOS.
I'm designing an app in Phonegap so I'm using HTML, CSS, Javascript etc.
This app uses the phones camera (a QR scanner to be exact) and I want the users to be able to use this app as quick as possible. So, like on my Android device I can access the camera without typing the password, is there a way you can do the same with your app ?
Application is still in the design stages so I'm getting everything together first to make sure what I want can be developed before I start the development, thank you.
In java you can define the attribute widgetCategory in your appwidget-provider to home_screen|keyguard
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="40dp"
android:minHeight="40dp"
android:updatePeriodMillis="86400000"
android:previewImage="#drawable/preview"
android:initialLayout="#layout/example_appwidget"
android:configure="com.example.android.ExampleAppWidgetConfigure"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen|keyguard"> //like here
</appwidget-provider>
But as per Google documents, this feature has been taken down from Android 5.0 Lollipop (only home_screen will be valid) so it will work for devices supporting Android 4.2 or above but below Android 5.0 which will be too limited.
The widgetCategory attribute declares whether your App Widget can be
displayed on the home screen (home_screen), the lock screen
(keyguard), or both. Only Android versions lower than 5.0 support
lock-screen widgets. For Android 5.0 and higher, only home_screen is
valid.
I am looking for tools that allow to perform profiling of websites on mobile devices similar to what Firebug and Chrome dev tools allow to do.
I have used Weinre quite extensive. While it is an awesome tool to use with real devices, it does not provide facilities for run-time profiling.
Has anyone heard or used any tools that allow to do so?
Here is a great list of mobile performance testing tools from Steve Sauders (the guy that wrote the book "High Performance Web Sites"):
Mobile Perf bookmarklet - An uber bookmarklet with links to multiple other bookmarklets useful for mobile (mine)
Jdrop - JSON in the cloud for gathering data on mobile devices (mine)
Mobitest - Connects WebPagetest.org to Android and iPhone devices (Blaze.io)
pcapperf - Get HTTP waterfall charts from your mobile device connected to a wifi hotspot, blog post (open source)
WebWait - The only way I can think of to measure page load times on real devices over 3G - load URL in an iframe (Michael Mahemoff)
weinre - Web Inspector Remote, very cool way to debug your mobile device remotely (Patrick Mueller)
Reflow Timer - Bookmarklet to measure reflow time (Lindsey Simon, open source)
Favelet Suite - An uber bookmarklet, tons of features! (slayeroffice)
Source: http://stevesouders.com/mobileperf/
UPDATE:
You can use Chrome Devtools with an Android device and you can use Safari Devtools on a Mac with an iOS device.
Chrome: https://developer.chrome.com/devtools/docs/remote-debugging
Safari: https://blog.idrsolutions.com/2015/02/remote-debugging-ios-safari-on-os-x-windows-and-linux/
You connect via USB
You can profile/debug/inspect Chrome-on-Android using the desktop Chrome developer tools interface:
https://developers.google.com/chrome/mobile/docs/debugging
It'll require Chrome, an Android device able to run the Chrome app, and a USB cable.
Its a bit annoying to setup, because you have to install and use the ADB console command, but once its working, you'll have the full chrome developer tools interface available for debugging mobile.
Additionally, Google appears to be supporting this feature for new dev-tool Crhome extensions like PageSpeed.
For iOS debugging on Mac, you can use desktop Safari:
connect your device with a USB cable
start the app on the device
launch Safari on your computer
go to Develop -> device_name -> file_name.html
(if the Develop menu is not available for you, then go to Edit menu > Preferences... > Advanced tab and check Show Develop menu in menu bar checkbox)
It launches standard Safari web inspector, which is pretty similar to Chrome Developer Tools, although somewhat limited compared to it.