Post Reply

Using CSS3 media queries in Android app development

10th June 2014, 10:14 AM   |  #1  
OP Junior Member
Thanks Meter: 1
 
9 posts
Join Date:Joined: Apr 2014
Hi,

I am using HTML5 to develop Android apps on Netbeans. As we have different screen sizes on both phones and tablets, designers use media queries in CSS3 to tackle this to display the contents for mobile sites.

I want to know if by using CSS3 media queries, will they work on Android app like they work on mobile sites?

Thank!
Last edited by ali20142014; 10th June 2014 at 10:23 AM.
10th June 2014, 02:16 PM   |  #2  
Archer's Avatar
Senior Moderator / Recognized Developer - (Un)Recognized Pole Dancer
Flag Northampton
Thanks Meter: 4,064
 
10
13,804 posts
Join Date:Joined: Jul 2008
More
Quote:
Originally Posted by ali20142014

Hi,

I am using HTML5 to develop Android apps on Netbeans. As we have different screen sizes on both phones and tablets, designers use media queries in CSS3 to tackle this to display the contents for mobile sites.

I want to know if by using CSS3 media queries, will they work on Android app like they work on mobile sites?

Thank!

Yes, it works in the exact same way. Even though it's not apparent, web apps are running in a standard WebView control, so they as compliant with HTML5 and CSS3 as the framework which it's running on.

Check here for more info...

http://developer.android.com/referen...t/WebView.html
10th June 2014, 07:29 PM   |  #3  
OP Junior Member
Thanks Meter: 1
 
9 posts
Join Date:Joined: Apr 2014
Can you tell me how I can put an icon to be visible on the homescreen after installing the app? And also, I installed an app which I created, but it asked me permissions to access my camera, gps, contacts etc. However, my app does not work with these things, so how to prevent these permissions to be asked before installing?
14th June 2014, 05:29 AM   |  #4  
Junior Member
Thanks Meter: 1
 
11 posts
Join Date:Joined: Jan 2011
More
Android Manifest
Just remove the permissions in the Android Manifest (AndroidManifest.xml). Usually it looks something like this:

Code:
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes