Using CSS3 media queries in Android app development - Web App Development

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!

ali20142014 said:
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!
Click to expand...
Click to collapse
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/reference/android/webkit/WebView.html

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?

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" />

Related

[Q] Animated GIFs for the GT-s5360?

Hello, fellow Samsung Galaxy Y owners.
I've been doing a bit of research, and a lot of attempted tweaks, but so far have had no luck on my own.
In short, I want animated GIFs to play on my phone.
I've tried various ROMs, and none of them seem to have it, and nobody ever seems to bring it up as a feature request.
My googling has found, on GitHub, /CyanogenMod/android_external_webkit/commit/dcc592df10bcce76be37cf9fa49292e8b132f7d2
Suggesting that it -is- possible, if the rom has this option compiled into WebCore/platform/graphics/android/ImageSourceAndroid.cpp and Android.mk -- however, I have no experience with compiling this, otherwise I'd attempt this on my own. I also have no idea which files I'd need to replace.
How do i get GIF animations working? Do I replace a core APK? Do i need a new kernel? Do I need to figure out how to compile my own ROM to get this to work?
Thanks in advance.
There's an app in the market. Just search it.
Sent from my PG86100 using xda premium
Yes, i've found an app to play gifs, but I have to download the gifs first.
For browsing things like gifdumps, or browsing reddit posts in baconreader, that is klutzy and HIGHLY annoying, and I'd much rather that the web based apps be able to natively animate the gifs.
Or, is there an app that will enable the native gif animation?
If so, what search terms should I be using, as my crawling thru the play market have turned up nothing over the past 3 months or so.
what do u want with gif's? for wallpapers? we have live wallpapers
Buddy use uc browser gif images are supported in it
Check this out
http://forum.xda-developers.com/showthread.php?t=81
alkesh95 said:
Buddy use uc browser gif images are supported in it
Check this out
http://forum.xda-developers.com/showthread.php?t=81
Click to expand...
Click to collapse
I think you missed some of the link there, as it's invalid.
Allow me to clarify.
On other android devices, running Gingerbread, GIF animations run in the apps, by the native web rendering code. EG: BaconReader. Dolphin Browser. The standard browser. Apparently, this gets -disabled- on "Lower End" devices automagically during compilation
What I am asking for, has anyone tried, at all, to change those limits, so that -all applications- are able to display animated GIFs, WITHOUT having to resort to using another app to view them.
Also, to the person who suggested UC Browser, please do a little research to make sure that what you are suggesting is supported by the device. Google Play market tells me that it is incompatible with my device. And, I'm willing to wager that it does NOT support GIFs on my device, as gif animation is -disabled-, unless it uses it's own native rendering code instead of piggybacking off of the code supplied by Android.
clarjon1 said:
I think you missed some of the link there, as it's invalid.
Allow me to clarify.
On other android devices, running Gingerbread, GIF animations run in the apps, by the native web rendering code. EG: BaconReader. Dolphin Browser. The standard browser. Apparently, this gets -disabled- on "Lower End" devices automagically during compilation
What I am asking for, has anyone tried, at all, to change those limits, so that -all applications- are able to display animated GIFs, WITHOUT having to resort to using another app to view them.
Also, to the person who suggested UC Browser, please do a little research to make sure that what you are suggesting is supported by the device. Google Play market tells me that it is incompatible with my device. And, I'm willing to wager that it does NOT support GIFs on my device, as gif animation is -disabled-, unless it uses it's own native rendering code instead of piggybacking off of the code supplied by Android.
Click to expand...
Click to collapse
On play store it will show incompatible but visit wap.ucweb.com u'll get the latest version of uc
And yes it uses its own rendering codes
Be happy

Is PhoneGap suitable for developing Android app

I want to learn developing Android app. I don't know much about java, however, I am skill at web design. PhoneGap seems an easy way for me to start learning developing mobile app. I'm not sure apps that build upon PhoneGap are good choice?
any help?
While Phonegap may be a tempting framework, try not to fall into it's trap. No matter what you'll do, it will get slow. Trust me, I've been there. Just try to display a table with 200 rows and it starts to lag.
You can forget your web experience because what you'll be doing is trying to get a normal web code to work on mobile. Most things will not work as you would expect it to work in Firefox or Chrome. You'll end up doing frustrating optimizations. 95% of your time will be wasted on shouting with your computer
Nothing compares to the look and feel of a native app, especially a native Android app. iOS did not really have a uniform design before version 7 but Android always had one. And there is no need to try and reproduce it with laggy html pages. Go the native way
Do not forget about browser touch lag http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away
There are ways to remove it for example with http://ftlabs.github.io/fastclick/
From my experience - if you can write native app - do it. Web apps are slower and less responsive.
Wicia said:
Do not forget about browser touch lag http://updates.html5rocks.com/2013/12/300ms-tap-delay-gone-away
There are ways to remove it for example with http://ftlabs.github.io/fastclick/
From my experience - if you can write native app - do it. Web apps are slower and less responsive.
Click to expand...
Click to collapse
I was of the understanding that Chrome and Firefox for android removed this touch lag with one of their recent updates.. I may be wrong though.
Edit: link
http://www.geek.com/android/google-removes-300ms-touch-input-lag-in-chrome-32-for-android-1579721/
I would also highly recommend Codenameone for creating native apps for BB, IOS and Android that compile from Java..
crisdo98 said:
I was of the understanding that Chrome and Firefox for android removed this touch lag with one of their recent updates.. I may be wrong though.
Click to expand...
Click to collapse
You are right, but Phonegap apps run inside a WebView, not in the browser, and I think WebView still has this lag, even in Android 4.4 where it is based on Chrome 30 (this tweak comes in Chrome 32).
and also note,
WebView in GB behaves lil bit differently than webView in ICS and soo on...
for and android app, almost all of us developer try to support GB/ICS at minimum, but webview are not consistent.
I really am struggling to support my app on GB. and I think on KitKat Webviews are awesome, but the market share of KitKar are minimum so its not much of more use to us until few couple of months more
PhoneGap
According to me PhoneGap is a good choice for developing cross platform mobile apps. PhoneGap gives a extreme support for HTML5 language which enable developers to create hybrid apps with less amount of knowledge of other language.
hire phonegap developer
Phonegap ruled the mobile application development world by launching a platform on which universal app can be developed. The application developed on PhoneGap is widely recognized as cross platform mobile development framework which is known as single app accessible to multiple operating systems. PhoneGap considered being a king of app as its combination of HTML 5, JavaScript and CSS3 to produce hybrid applications.
It really depends on what kind of app you are developing. If it is an app just displays some static data or pic, the phonegap should work just fine.

[Q] Website into an App

I'll keep this as simple as possible.
First:
my coding experience is that of a Kindergartners. I'm sure at this rate if i want to get anything done i may need to hire someone.
However, i would still like to learn.
SO MY QUESTION:
Is it possible to make an app that pretty much is just a website?
For example, the app would essentially be the website. I.e rather than go to m.Facebook.com you would be downloading Facebook App.
However the only difference would be that one is via an app and one is via the mobile browser. No feature difference. nothing.
I think of it as a "Drag and Drop" you take the website and drop it into the 'framework' of an app.
it must be possible, if so. How? is there a tutorial? or is someone willing to explain this?
I Do know exactly what i want done, so if you're super educated with something like this i am willing to pay a small amount for the app.
Or if you want to know more about exactly what i want message me.
Of corse it is possible - that's what a Web App is.
Take a look at developer.android.com/guide/webapps/index.html
Basically, you just toss your web stuff (html, css, javascript, ...) inside an app acting as native wrapper and displaying your content through a Web View.
But if your app is just ment to be an identical copy of your website, I would not advise it:
WebViews are not exactly state-of-the art, and may show little inconsistencies or behave differently than mobile browsers
Every time you update a single file on your website you need to release an update for the app as well - unless you leave your content on the web and the app loads it remotely, but that would mean a very slow app
Web Apps are tipically a choice when you need to target multiple platforms (android, ios, ...) at once or when you want to fast-prototype an app and you're more skilled at html development than Android.
Unless, of course, you have other specific reasons to build an app for your website.
There is also another way to make your website look like an app (at least, for those using Chrome Mobile):
developers.google.com/chrome/mobile/docs/installtohomescreen
Mobile App Developers
Yes for sure.. We can convert an website into app. This is all covered in Mobile App Developers work...
Yes, of course. Use PhoneGap
Hi,
of course, that's possible. All you have to do is try out PhoneGap. Use google to find it.
I did not use it before, because I like native apps without any "gaps" between. But for a quick'n'dirt hack you will find it usefull, I think.
The site says:
Easily create apps using the web technologies you know and love: HTML, CSS, and JavaScript
Click to expand...
Click to collapse
Please provide the code
Sure. It is just what phonegap can do for you.
sensislee said:
Sure. It is just what phonegap can do for you.
Click to expand...
Click to collapse
Do we need to pay Phonegap for Code?
Sent from my SM-I9600 using Tapatalk
snowsunil said:
Do we need to pay Phonegap for Code?
Sent from my SM-I9600 using Tapatalk
Click to expand...
Click to collapse
No, as I know, Phonegap is open source and free.

[Q] Surface RT Android App Help!!!!

Hi Guys
I am after a Android app that I use and I really need which is called Mobile CMS. I want to know is there a way to install Android apps on the Surface RT and run. I connect to my work cameras using my IP address and port number to connect to my DVR.
or if they is any other software I can use for what im looking for?
Your help is much needed
Thanks
Steve
"Is there any way"? No. Why would you even think that? Can you install iOS apps on Android? No!
"any other software"? I don't know. There's a number of protocols used for those types of connections. You may even be able to just use a web browser; RT (unlike recent versions of Android) supports Flash, and some of those cameras let you view their feeds in the browser using Flash.
GoodDayToDie said:
"Is there any way"? No. Why would you even think that? Can you install iOS apps on Android? No!
"any other software"? I don't know. There's a number of protocols used for those types of connections. You may even be able to just use a web browser; RT (unlike recent versions of Android) supports Flash, and some of those cameras let you view their feeds in the browser using Flash.
Click to expand...
Click to collapse
Iv tried using the web browser but it doesnt want to open it. Its just a blank page with a grey X on the corner of the page meaning it doesnt allow to view the image.
Probably needs a different plugin then, like Silverlight or Java. RT supports Flash, but no others. That's too bad.
Just checking: is your Surface up to date? *VERY* old RT firmware would not run Flash by default on most sites.
Anyhow, if you know what protocol it uses for video streaming, you can probably find an app in the store that understands it and can display the feed.
GoodDayToDie said:
Probably needs a different plugin then, like Silverlight or Java. RT supports Flash, but no others. That's too bad.
Just checking: is your Surface up to date? *VERY* old RT firmware would not run Flash by default on most sites.
Anyhow, if you know what protocol it uses for video streaming, you can probably find an app in the store that understands it and can display the feed.
Click to expand...
Click to collapse
Yes it up to date. i just really need this app or anything on the lines that im looking for that can connect to my DVR.
Anyone else have a idea... Something??
You've had the only answer possible with the information given.
What is the DVR in use?
The forums for the DVR in question would be able to help better.
The only other possible answer: buy an android device

How to create an Android app using HTML, CSS and JavaScript

Hello, I have a question on Android development. Personally, I know web development but I do not know JAVA programming because I am not into software development.
I want to develop an android app by using HTML5, CSS3 and JQuery Mobile. The app will be simple, it will be just an app on poetry where users will click some categories and read poems, and also search. That's all. It will be free, no registration, no ads and no server side. I want to use JQuery Mobile for this or even pure HTML5 and CSS3. In fact, HTML and CSS will be used of course.
Bear in ind that I am NOT converting an existing website into an app, but rather creating an app through HTML, CSS and JavaScript. So, the Web View tool is not appropriate here.
My questions are:
1/ Can we really create an APK with obly HTML, CSS or JavaScript?
2/ If we can create, what software (which is free) can I use to create the APK by compiling/converting my web pages?
Thank!
ali20142014 said:
Hello, I have a question on Android development. Personally, I know web development but I do not know JAVA programming because I am not into software development.
I want to develop an android app by using HTML5, CSS3 and JQuery Mobile. The app will be simple, it will be just an app on poetry where users will click some categories and read poems, and also search. That's all. It will be free, no registration, no ads and no server side. I want to use JQuery Mobile for this or even pure HTML5 and CSS3. In fact, HTML and CSS will be used of course.
Bear in ind that I am NOT converting an existing website into an app, but rather creating an app through HTML, CSS and JavaScript. So, the Web View tool is not appropriate here.
My questions are:
1/ Can we really create an APK with obly HTML, CSS or JavaScript?
2/ If we can create, what software (which is free) can I use to create the APK by compiling/converting my web pages?
Thank!
Click to expand...
Click to collapse
You'll need to go through the (sometimes painful) installation of Eclipse/Android Developer Tools and the Android SDK...
https://developer.android.com/sdk/installing/bundle.html
After that you can then do exactly what you are asking for with this...
http://cordova.apache.org/
I'm using that technology to create professional apps (as in, commercial apps for customers) using HTML5 & CSS, Javascript, jQuery and I opt for Bootstrap over jQuery Mobile as it's a lot lighter, but jQuery Mobile works fine with it too.
There's also PhoneGap, but that's just a rebranding of Cordova at the moment. They may branch out in different directions at some point, but at the moment there's no difference. The only advantage to PhoneGap is that you can point it at your source on GitHub and it will build online for you. Very handy if you want to do pure online development, but a bit messy.
Thank you for replying. I think I will try with the PhoneGap and Eclipse as you suggested. I have other questions:
1/ Even the APK will be developed using just HTML, CSS and JavaScript, how to notify the user an update is available through a notification method? I am not asking for tutorials, but just the steps.
2/ As you know, to view the source code of a website, a user will right click and view. As the APK will be developed using client side languages, will they be able to view the source codes in any other way apart decompiling?
ali20142014 said:
Thank you for replying. I think I will try with the PhoneGap and Eclipse as you suggested. I have other questions:
1/ Even the APK will be developed using just HTML, CSS and JavaScript, how to notify the user an update is available through a notification method? I am not asking for tutorials, but just the steps.
Click to expand...
Click to collapse
Your best bet is to let Google Play Store do all that for you. It means paying for a developer account, but it's not expensive and it means that people can get your app from the Play Store, which looks a lot more credible than a link and instructions how to allow 3rd party apps. Also, you push an update to the Play Store, and that pushes the update to all your users. You can't really ask for better than that.
ali20142014 said:
2/ As you know, to view the source code of a website, a user will right click and view. As the APK will be developed using client side languages, will they be able to view the source codes in any other way apart decompiling?
Click to expand...
Click to collapse
They can't do anything as simple as "View source" as all the files are embedded in the application, but they can decompile it and get at your source that way, but there's nothing to stop someone doing that with an APK anyway. They best thing would be to develop your app till your happy with it, and then obfuscate the crap out of the html, css & js files. Sure someone could decompile the app and get your source, but they'd really struggle to do anything with it.
Have a play with it and see if it's any good for you. It really does make it simple for a developer with web experience to make apps.
Also, if this is of any use, I made a guide for developing and building Phonegap Android apps purely online, without any SDK or IDE installation. It's not ideal as debugging would be a nightmare. I mostly made it as reference for myself, but check it out anyway...
http://johncmolyneux.blogspot.co.uk/2014/05/how-to-build-android-apps-online.html
Sorry for the late reply. Can I know where is the APK file is stored?
ali20142014 said:
Sorry for the late reply. Can I know where is the APK file is stored?
Click to expand...
Click to collapse
/data/app/packagename-1.apk
You tube is your friend
Just do a youtube search with these key words "html5 webview android" and you should be able to find everything you need to know on how to build your html5 powered app
Google offers a "ProGuard" solution on how to mask your code by obfuscation. Good luck!
You can also use phonegap build to build your web apps without using eclipse.
You can't make an app using HTML and all these web developing languages but you can simply make a responsive website (I hope you know that) and then integrate that website into the android app. You may also add something like that once a user opens app once his app will connect to your website and then download the files offline for future offline use.
You can make fully functional games and apps with HTML + Javascript. Once you learn a the basic's you can use the framework I posted here to make a quiz game. As you learn more you can make small puzzle games and action games but that takes time to learn. Start by using this framework to build a game.
http://forum.xda-developers.com/showthread.php?t=2785378
And if you dont know how to use eclipse then use phonegap build it will build the game for you and the 1st game is free with their service.
Sorry, just saw this now... i could have saved you a bit of hassle
If you really dont want to make a deep dive and stay with your current skills theres a really great way to do so (no, im not involed in the project and wanna advertise it i just use it and love it).
Theres really great tool from Intel, named Intel XDK. This thingy lets you easyly use either the Intel based framework (thats really fast and depending on how you "build" the app at the end you get native code, not just an simple AKP that displays content in a webview.).
The above mentioned Cordova is also a build option, so if you already learned about that, you can still use it in here. You can also make the userinterface of your app in a drag&drop IDE that saves you TONS of time.
Check here for some easy examples:
http://app-framework-software.intel.com/components.php
The very best comes at the end, you dont have to care ONE BIT about installing anything on your machine, all build stuff is done on Intel servers. You code the app, decide on a way to build it (Cordova, Android, iOS or whatever) and you get an APK out of it. Whats more, you can test/debug directly on device, in browser or any other possible way.
If you dont want to learn the appfraework (whats is basically just like jquery, you dont really have to "learn" it if your familiar with javascript) or use other known frameworks like jQuery mobile. Best is, you can still use the IDE-Designer even with jQuery. So you can for example choose jquerymobile framework and but in a nvigation layout just with drag&drop. Of course you als have a standard Code-View with autocompletion and all if you want.
Take alook, its awesome...
The reason why i post this here that tere is one flaw (in my opinion), the documentation is not the best (its there of course, full API guides and all) and the Intel foum is not really active, since noone really knows about it it seems. If more ppl use it the community could be great and starters have a really easy tool at hand to get into the world of mobile-development.
Hi,
You can create an Android app using the HTML, CSS, JavaScript by PhoneGap. PhoneGap is a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about. You can learn it at: phonegap.com
Good luck!
Website 2 APK Builder
The all new Website 2 APK Builder for Windows is now available at sourceforge.
as i'm new and can't post external links,
so i'm unable to provide a link of it,
try searching "Website 2 APK Builder" on Google.
Just Launched Yesterday,
that's all.
Easy to use,
Generates ad-free apps.
and available for offline use.
Give it a try.
Oboy
oboy
If you're planning on making a update thingy like that basically use github for that where you have a text file and test for the version every time the app launches with window.onload in JS
ali20142014 said:
Hello, I have a question on Android development. Personally, I know web development but I do not know JAVA programming because I am not into software development.
I want to develop an android app by using HTML5, CSS3 and JQuery Mobile. The app will be simple, it will be just an app on poetry where users will click some categories and read poems, and also search. That's all. It will be free, no registration, no ads and no server side. I want to use JQuery Mobile for this or even pure HTML5 and CSS3. In fact, HTML and CSS will be used of course.
Bear in ind that I am NOT converting an existing website into an app, but rather creating an app through HTML, CSS and JavaScript. So, the Web View tool is not appropriate here.
My questions are:
1/ Can we really create an APK with obly HTML, CSS or JavaScript?
2/ If we can create, what software (which is free) can I use to create the APK by compiling/converting my web pages?
Thank!
Click to expand...
Click to collapse
I'm not sure if it's still a question for you but maybe try to search some helpful articles on this subject? They are usually easy to read and you'll an understanding of what you need to do.
we can create an APK with only HTML, CSS or JavaScript through new frameworks
CODENAME ONE
This cross platform framework enables in growing industry-based totally applications. The level underpins fast application development. The designer can compose code in Java and the software may be attempted and showed with Codename One’s test system devices and check mechanization devices. The system bolsters well known IDEs like NetBeans, Eclipse, and IntelliJ idea. The maximum captivating detail about its collect server is that the designer can fabricate local iOS applications simply as nearby windows packages with out a Mac gadget or windows pc. The degree is usually recommended for creating iOS applications.
You may ask your suggestion from App Development Company in Bangalore which helps in developing innovative apps according to your ideas

Categories

Resources