it is possible to turn on gps from mobile browser? - laravel

I have website based on laravel framework and I use geolocation maps api inside my website. When user access my website from mobile browser and their gps is turn of, can I turn on the gps from mobile browser chrome/firefox ? Like in the android/iOs app..

Related

With a Spring MVC webapp, can you take a photo on a mobile device and upload it to the server?

I was asked to write a webapp using Spring MVC that among other things it must either take a photo on a mobile device or at least upload it from the device's photo library. Apparently we have some product (probably .NET based) that allows taking/uploading photos from the a web page displayed on a mobile and is where they got the idea from. Most devices will be iPhones but some might be Android.
Is this even possible with a Spring MVC webapp - with no code on the mobile device?
If yes, how would you go about designing this? Is it simply a matter of implementing a file upload as you would from a PC and trust that the mobile device will somehow magically handle the "take a photo" or "pick the photo from the image library", or is there more to it?
Is there anything else I need to know about?
Yes, although I am experienced with Spring MVC and even "normal" webapps that are accessed from a mobile... I am clearly clueless about this type of "photo" app.
write the web app allow access to the camera through the browser of device, when the users take the photo send it to web app or simply create the form allow user select image from device. ( with browser of device you can access camera or folder on device

Laravel check if request came from browser or rest client (mobile app)

I am using Laravel 5.1
In my project there is a service-based architecture in MVVM pattern. Hence, all of the data return by the server is using api calls.
The same services are used by the client browsers as well as by mobile apps (i.e. we've created in Android and iOS) for CRUD operations.
I want to detect now if the request is came from any browser (including mobile browser too) or is called from any mobile device (i.e. using mobile app, NOT the mobile browser). Is there any way to differentiate it?
Setting custom header in requests (i.e. coming from mobile apps) can be a solution but I don't want to follow it if any solution is possible using laravel codes.
it working for me.
`
public function somethingfunc(Request $request)
{
$request->header('User-Agent')
....
`
Presently there is no function to detect device type in Laravel 4, 5 and 5.2,
However, you can simply check if device mobile with this.
if( preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i", $_SERVER["HTTP_USER_AGENT"])){
//hey I'm a mobile device
}
To detect other device features such as screen resolution, screen size, OS etc, you can try some of this Laravel Packages:
https://github.com/CodyPChristian/browscap-laravel
https://github.com/hisorange/browser-detect

Does app store or Play Store allow apps that have a WebView only to my site?

I want to publish an app witch contains a WebView to my site only
and thats the whole app. Like Mobile Web app but comes from the stores.
Does app store or Play Store allow apps that have a WebView only to my site?
Yes, you can published an app which contains just a WebView of your own website. Please note that according to Google Play Developer Program Policies, it's not allowed to publish apps that provide a WebView of a website you don't own or administer:
Do not post an app where the primary functionality is to:
Provide a webview of a website not owned or administered by you (unless you have permission from the website owner/administrator to do so)
Reference: http://play.google.com/about/developer-content-policy.html
According to Apple's App Store Review Guidelines,
apps which are just web views are not allowed:
4.2 Minimum Functionality
Your app should include features, content, and UI that elevate it beyond a repackaged website. If your app is not particularly useful, unique, or “app-like,” it doesn’t belong on the App Store.
Reference: https://developer.apple.com/app-store/review/guidelines/#functionality
Yes You can but when you implement webview in your application few things must keep in mind
Webviews and Affiliate Spam
We don’t allow apps whose primary purpose is to drive affiliate traffic to a website or provide a webview of a website without permission from the website owner or administrator.
Here are some examples of common violations:
An app whose primary purpose is to drive referral traffic to a website to receive credit for user sign-ups or purchases on that website.
Apps whose primary purpose is to provide a webview of a website without permission:
Google play Developer Policy Center link

Mobile Chrome Apps payments API

I'm working on publishing my Chrome App to Google Play using the Chrome Apps for Mobile tools.
As Mihai Ionescu mentioned, there are two Google Wallet Merchant APIs: Google Wallet for Digital Goods API (used for Chrome Web Store apps) and Google Play In-app Billing API (used for Android apps). As far as I'm located in Belarus, Play API is supported for my country, but Digital Goods is not, though the Supported Locations table doesn't mention any API differences.
Mobile Chrome Apps Payment Plug-in ReadMe says:
This plugin allows you to sell digital and virtual goods within your app. It is built on the Android In-App Billing API and the iOS In-App Purchase API. It provides a JavaScript interface similar to the Chrome Apps Google Wallet for Digital Goods API, so that you can use the same API in both a desktop and mobile Chrome App.
Questions
What exact API (Google Play or Digital Goods) is used for mobile Chrome Apps and can I really use one merchant API for both mobile and desktop versions?
If different APIs are used, is there any way for a desktop Chrome app to check that a user has purchased the mobile version via Google Play?
For mobile, you will use Google Play In-app Billing API, as the item will ultimately end up on the Google Play Store. Regardless of the API, you will only need to create a single Google Wallet Merchant account to sell your goods, thus using a single Merchant Id.
Unfortunately, there is no way to verify a user's purchases within the app on different platforms (web vs mobile).

Send Glympse API Web API?

Besides showing a web mapview of Glympse.
Is there any JS lib to do the sending of Glympse via Web API? It would be useful to develop mobile / desktop web application that uses the geolocation HTML5.
At the moment map control is the only public API that we provide for the Web. We are going to extend the set of exposed APIs and supported platforms over time. Keep an eye on our announcements!

Resources