Unofficial CM12 for Android One, Disabling Encryption on Nexus 6 – XDA TV

Android One devices have received an Unofficial CyanogenMod … more

Pushbullet Universal Copy/Paste Availabe for Linux, Mac OS X

Pushbullet is one of those useful utilities that once installed, permanently … more

Enable the Hidden Notification LED on the Google Nexus 6!

LED notification lights have existed on Android devices since the very beginnings … more

MX Player Ready to Rock on Lollipop

A good video player should be reliable and free. One of the XDA Community Apps, MX Player, meets both of … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Is it possible to make app that adapts to phone hardware?

OP xorg23

24th May 2014, 12:47 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: May 2014
Hi there.

I have one question - I'm starting to learn android development and I want to know one thing - can I write app that will adapt to phone on which is installed? I mean - for example - app will use wifi, gps and ringtone to give me location of a phone. If phone has gps - it will use gps. If not - it will switch to wifi. If phone is old and has no wifi or gps it will ring. I want detect it automaticaly beacuse app will be installed on different models and by users that know nothing about device so it must be done inside of app and not by user.
24th May 2014, 02:24 PM   |  #2  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 524
 
1,103 posts
Join Date:Joined: Feb 2012
More
Quote:
Originally Posted by xorg23

Hi there.

I have one question - I'm starting to learn android development and I want to know one thing - can I write app that will adapt to phone on which is installed? I mean - for example - app will use wifi, gps and ringtone to give me location of a phone. If phone has gps - it will use gps. If not - it will switch to wifi. If phone is old and has no wifi or gps it will ring. I want detect it automaticaly beacuse app will be installed on different models and by users that know nothing about device so it must be done inside of app and not by user.

Yes it is possible. but I dont remember any phone without WiFi,gps .every device have them

Sent from my GT-S5570 using XDA Premium 4 mobile app
24th May 2014, 03:00 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
2 posts
Join Date:Joined: May 2014
Quote:
Originally Posted by arpitkh96

Yes it is possible. but I dont remember any phone without WiFi,gps .every device have them

Sent from my GT-S5570 using XDA Premium 4 mobile app

That was example. I need to write an app that will switch from one option of communication to another is one of them is not avaible (no signal or simply is not supported) or simply to conserve battery.
24th May 2014, 06:43 PM   |  #4  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 524
 
1,103 posts
Join Date:Joined: Feb 2012
More
Quote:
Originally Posted by xorg23

That was example. I need to write an app that will switch from one option of communication to another is one of them is not avaible (no signal or simply is not supported) or simply to conserve battery.

Again yes its possible .Google maps do this.it prompts to switch on WiFi or GPS etc for location accuracy

Sent from my GT-S5570 using XDA Premium 4 mobile app
24th May 2014, 06:53 PM   |  #5  
krypdon's Avatar
Junior Member
Thanks Meter: 0
 
4 posts
Join Date:Joined: Mar 2014
Yes! That is possible and most apps are designed in this fashion.

Sent from my GT-N7100 using XDA Premium 4 mobile app
25th May 2014, 02:14 AM   |  #6  
Senior Member
Flag Cologne
Thanks Meter: 217
 
190 posts
Join Date:Joined: May 2013
More
This: http://developer.android.com/referen...va.lang.String) is what you want to use, amd here are the possible features you can pass/ask for: http://developer.android.com/guide/t...ures-reference . Keep in mind that you still need to have the matching permission.

Gesendet von meinem SM-N9005 mit Tapatalk
The Following User Says Thank You to giuliomvr For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes