I make an app...But I found a problem.
I Use telephony hardware for make a call for smartphone..
in my source i use
ng-click="openDial(tel)">
I need to detect SMARTPHONE or TABLET for show or hide DIAL DIV
How can i do it?
You'll have to make some guesses based on userAgent, perhaps on phoneGap's device info API, maybe some other things. It may be possible that there is some native API for figuring out if a dialer app is available .. but considering that it's entirely possible that a tablet could have something registered to dial numbers (at least in Android .. such as Skype or other VOIP dialers), perhaps you should just let it be.
Related
I am trying to make an app which constantly makes the transmitter of the mobile phone send out RF signals and receive the same signals when they are reflected back and detected by the receiver of the mobile phone.
I tried using my brain and searching on web to see how this is possible but i am not able to find an answer, so is it possible to make such kind of mobile application which can control the transmitter and receiver of mobile phone or even Bluetooth and WiFi because those are also RF signals!
if yes, please guide me briefly or share a tutorial link!
In my experience with iOS there is no device with RF chipset. So for iOS the answer is NO. I checked google too (several searches).
You can see the official specs of iPhone X. Nothing that related to RF.
If you really want to go far, check for external hardware (I hardly believe you’re going to find any)
You also have to be careful and make sure that you won’t breaking the iOS AppStore guidelines or your app will get rejected.
Good luck!
I have done some research on SO but the similar Q&A are for detecting if it has connection or not, but not about connection type.
The purpose of my website is that, if a user is on mobile(phone or tablet) and on wifi, play a video clip; if a user is on mobile and not on wifi, play a video clip; if a user is not on mobile, then play the video clip.
The reason for the different behavior is to avoid possible surcharges happen to the user due to the relatively larger size of the video clip. That is not related to speed - nowadays speed difference of LTE v.s. wifi maybe only little; it is more for the concern of users getting charged for the data usage without wifi connection.
So my question is, using AngularJS(<2.0),
1) How to detect the device is desktop or mobile
2) How to detect the device is connected to wifi or not
(I guess for Q1, the fallback is to use Bootstrap #media, but it isn't ideal.)
You don't need Angular to do such check.
In order to detect if a device is a desktop or a mobile, use navigator.userAgent, see this answer
In order to detect the connection type, use navigator.connection, see this answer
Be careful, this API support is not universal, see here.
Another way to do it is to try this plugin, which relies on internet speed check, but I have never used it.
Finally, if you REALLY need this info for smartphone users, convert your website on Cordova, then distribute your app.
With respect to finding out whether what device is used, this angular plugin can save some headaches:ngx-device-detector
install it: $ npm install ngx-device-detector --save,
add to the constructor. Then call this.deviceService.IsMobile() forexample to check if device type is mobile. It has other methods for checking if device is tablet or desktop and other methods that return usefull information about the browser.
i encourage devs to use feature detection, not browser or desktop/mobile detection. e.g modernizr has a feature detection for low-bandwidth connections, though it won't work in all browsers:
https://modernizr.com/download#lowbandwidth-setclasses&q=connect
the danger, as it states, is that unknown devices are assumed to be fast.
to get a sense of desktop vs mobile, there's a technique for listening to touch events. c.f.:
What's the best way to detect a 'touch screen' device using JavaScript?
regarding whether you should autoplay a video clip, if it's an HTML5 player, it won't autoplay on mobile anyway, for the reasons you mention, unless it's tied to a touch event (like hitting play).
i have gotten around this by "saving off" a touch event from earlier, like getting to the screen with the video player, and then re-using that event to autoplay. all that said, please consider if auto-play is truly what you want, as a lot of users find it annoying.
So, I am developing this VR website online with JavaScript.
I have a function that instantiates an object in the 3D room, at the given location that the user is "watching".
However, I don't see how I can execute that function when my iPhone is locked away in the VR headset. I have been thinking about volumeup-button on my headset that is connected to it or something, but haven't found anyone that has done that before.
Do you guys have any advice? Could there be a way of connecting a BlueTooth remote to it? Or is it simply impossible?
TLDR; How to execute a function in the browser on your phone, when you can't touch your phone.
It is possible to connect Bluetooth keyboard to iOS devices, as you suggested in your post.
You might also leverage the other sensors in the phone (such as accelerometer, gyroscope, microphone), but I'm not certain if Safari has access to those. You would have more options if you developed a standalone application rather than trying to go through a browser.
I have a company where I want to show every detail like offices, ladders and WC's on a map on a mobile app to be displayed to visitors.
I want also to track the visitors inside the company or "Mall" through their mobiles ... counting them a day for example , and making a small social network between them.
GPS unfortunately isn't accurate enough to be used here. can you suggest a better localization method ?
Bluetooth beacons are designed for this kind of thing but depend on you getting users to download the app and turn on Bluetooth. Look into Apple's iBeacon standard and Google's Eddystone. Both can be used on Android and iOS.
I want to dial number using javascript.
I have used following code
document.location.href = "tel:15555551212"
It brings me to dial screen of mobile application. But I want to make a call directly.
I have also used "callto" but it is not working.
This is not possible, unless:
the Web browser holds the CALL_PHONE permission (so that the user knows at install time that this app might place phone calls), and
the Web browser exposes some means to have you place a phone call directly, perhaps via some DOM extension or magic snippet of JavaScript
Few, if any, browsers will meet these criteria.
A hybrid application (e.g., PhoneGap) could do this, given the proper permission and some API to enable it (e.g., PhoneGap plugin, if it is not part of the standard PhoneGap API).
You will probably need to use apache cordova to get access to native device APIs, including the one you can dial with. Link to the respective plugin
This is obviosuly only possible on mobile devices, and this plugin can only operate on iOS and Android. For more information about cordova, see this Link.