To make a decent to high quality mobile version of my website? - java

I'm new to Stack Overflow, but I asked a question last night regarding some code and it was answered just over night. I'm very glad I finally signed up here. Anyway, on to my question...
I need to make a mobile version of my website [www.famebyname.us]
I am using Dreamweaver CS6, and my intention with the domain is to turn it into an online nightclub/chat/music type thing. It has a long way to go, but it's basic for now and can do for basic communication. I'd like to make a mobile version of it. But instead of just going forth with that, I thought I'd ask here if anyone could share some experience designing mobile sites [IE button sizes, content alignment, and above all how to keep the smartchatbox working for the mobile device while being size friendly.]
On a site note I'm going to be using the java code below to redirect users with a screen size under 699px to the mobile version aif anyone has any better recommendation for this type of redirection, I'm open to new ideas.
<!--if (screen.width <= 699) { document.location = "mobile.html"; } //-->
Thanks in advance.

Instead of doing all the coding for mobile site. Why not use the framework? There are many frameworks out there that support mobile friendly site. All you need to do is setup files and start calling them in div tags as classes and it will do all by itself. You would need to understand tho how it works.
Checkout this frameworks :
Bootstrap
Foundation
Ui kit
Semantic UI
Dont reinvent the wheel when you such powerful frameworks to help you.

Related

AJAX Chat How to add voice with Java?

Ok so I use Ajax Chat (http://sourceforge.net/projects/ajax-chat/) and it is a great chat script. I use the MyBB Integrated version and all is well. What I am wanting to know is how I could add voice capabilities.
Basically each channel would be similar to a Yahoo chat room and have a talk button. This way someone could talk and the rest of the room could hear.
Flash is NOT an option, and I tried RED5 with it and the results were terrible. Bad quality, couldnt hear half of the time, etc.
I have searched and searched and searched and all I find is calling, IP-to-IP, etc.
I would like to do this in JAVA if possible which is not one of my best languages. I do have root access to my server and it is linux (CentOS). So what I really need is a point in the right direction on how to do this.
Thanks in advance.
The best way to do this is to use the Java Speech API. You can find out more information about this at this site. This question was already answered actually in this link.

What's the right approach for creating an Android app?

I have a great idea for an Android app, but as I'm only familiar with php/js, I'm uncertain of which approach I should choose for creating it. The app will be based on a google map with a lot of position markers. There won't be any fancy animations or other heavy resource-demanding activities.
As I see it there are three different options:
Read up on Java and program the whole thing in Java
Create the map activity in Java as a mapview and then use webviews for the other activities (which can easily be scripted as html5 webpages.)
Script everything as a webapp (not really an option, as this is not a real mobile app imho.
I'm most keen on using no. 2 as I'm quite familiar with html/php/js/mysql. Have to read up on the html5 specifics, though. Questions:
I need access to GPS and camera hardware. Is that acheivable in webviews?
How complicated is it to pass variables between js in webview activities and java in other activities?
How big a difference in performance can I expect if I use option 1 vs option 2?
Other thoughts?
Kind regards,
Anders
You can choose number 2, but as we are talking about an android phone, you might want to get really accurate coordinates for your map, and you can only achieve this by accessing your phone GPS, through webviews the best you can get is the location trought the device internet IP adress, wich doesnt lead to a very accurate geo position.
The best choice is a 100% java application in my opinion.
1) Yes it's possible, but as commented it will be less accurate and probably slow.
2) Not complicated. Painful if you need loads of interaction between a webview and native app. Using a Javascript Interface that can be set up from the native app. You can basically inject javascript in a webview's html.
3) Heterogeneity of performance depending on device. Because your implementation will be based on the device's browser you can expect to get really sluggish behavior for older devices. Anything to do with HTML events (Dragging, Tabbing...) will have a knock on most devices, from my experience.
4) As #vodich comments there are other party frameworks. My benchmarking on PhoneGap and other js-based options is that they're a waste of time if you are looking at developing a professional app. I haven't developed on Adobe AIR but find a pain the need to be installing plugins to get native functionality (access to sensors, camera, etc) Mobile is all about fast, responsive behaviour. HDI is your finger, user is fast, so app needs to be fast.
EDIT: So hell yeah! Java FTW!
Albert.
4.Other toughts?
Yes, if you really want to make a great Android app, you should be using only Android and specific Android UI components, and give it a native look and feel. And regarding 1,2 yes it is possible, I would say not so complicated to just integrate them, but I think you'll eventually get in big problems.
Learn Java and write your application natively.
Webviews might allow you to use your php skills to present something to the user, but it's entirely one-way - you'll not be able to interact with what's inside.
The Android developer site offers fantastic documentation and jumping from PHP to Java isn't greatly difficult, though you'll need to get used to strict typing and "real" OOP.
Other thoughts? Don't go down the PhoneGap/Cross platform toolkit road - it might allow you to write applications for multiple platforms and using your current skills, but in the end you get a subpar app that doesn't feel right on either platform and doesn't fair well as future versions of iOS and Android are released.

Device to Device Communication in Android

I have been tasked for university to program a mobile phone application. I have oppted for two mobiles to communicate with each other via message.
I would like the application to connect the mobile to the internet to send the message and the other mobile to connect to the internet to recieve the message.
I am using Eclipse IDE.
Does anyone have any ideas for good examples of similar application source code so I can develop my application using appropriate protocols.
I would appreciate any advice and I am certainly not looking for someone to give me "the answer" I am really looking forward to getting stuck in. Though I have never touched an android phone let alone programed one. So some advice would be amazing!!
Thanks
Si
Get used to this site: http://developer.android.com/index.html Learn it, love it. It's full of useful information. The Videos section gives plenty of live talks about what exactly Android is among other topics. One of the first things you need to do is go to the SDK section. It gives a detailed guide on how to get setup. The Dev Guide is great for learning more about Android and how to program Android apps (not just Java programs) especially while just getting started. Resources is full of code examples and articles on specific issues and Reference is the entire platform documentation. #Matthew Willis has already given a helpful link from the Dev Guide.
Look around the site, download and install the SDK, and come back whenever you have any questions. Good Luck!
Before you determine the technical solution you need to figure out how any two devices that don't know about each other will communicate.
In your case, where you seem to be attempting to develop some kind of peer-to-peer solution you most probably will need some kind of server in between where your phones send messages to and poll for messages.
If you are using WIFI, you would have each phones IP address and could configure each phone to communicate with each other directly.
Once you determine your architecture then something simple like http may be enough to communicate.
You might check out What is Android? to get an idea of the frameworks/libraries that are available on Android. Reading the links in the left pane at that site lead you through a nice series of articles about Android.
In terms of ways for two devices to communicate, they are many and difficult to enumerate. In general you will have much better luck with specific questions here than you will with broad questions.
You might be interested in reading about C2DM for pushing messages to a device; if not, there are many other alternatives involving polling.
GCM CSS is probably your best bet
https://developer.android.com/google/gcm/ccs.html

Make widget that will follow user behavior at webpage/web application

I would like to make/implement an widget that will show statistics for specific user at webpage (number of clicks at some links or butons, etc.). Initial idea is that user can click at some small button in corner of window and widget with his statistics will appear. That will later also be packed as Firefox plug-in.
Regarding my present searches, I found that there are couple free tools (like AWStats, Webalizer,...) that are doing similar job, but I'm not sure is it possible to customize them and implement in manner that I need. Also I was looking for Google Analytics API, but it looks like much more complex tool than I need here.
Technologies that I thought to use are GWT (Google Web Toolkit), because other parts will be written in Java and in my readings I found many thumbs up for this technology. I have to mention that I’m beginner in GWT, as well as web development, but I have experience in desktop application development, so I’m not beginner in programming.
If you need more information feel free to ask, and I’ll do my best to make my questions as clear as possible! Thank you in advance!
Nemanja

Whats the best way to start programming for my non-smartphone?

I have a general old-fashioned phone that has no special app system and uses Java (I assume ME) for the few applications you can use on it.
This is still a decent userbase and I'd like to start programming for this type of phone. I already know basic Java theory and syntax, so.. where do I get started for programming for non-smartphones?
Best programming environment for Java ME IMO is Eclipse with EclipseME. Includes lots of built-in stuff about packaging your midlets etc. The SonyEricsson wireless toolkit is great for PC-based testing and debugging, but don't forget on-device testing!
If you don't know much about Java ME's lifecycle, then get reading as widely as you can, and try lots and lots of examples. Start with the JSR-118 (MIDP2) javadocs; you'll want these open on your desktop at all times while coding.
Don't waste too much time with the form-based user-interface; I recommend either rolling your own using Canvas, or read about LWUIT.
You can do all sorts in Java ME and target a very broad range of handsets. HTTP capability is guaranteed, so you can hook up to a public web service, or create your own using something like Google Appengine.
Finally, you can release your app very easily on somewhere like Get Jar. Don't be put off by those who say "no owners of Java ME handsets want apps", you'll find the most popular user bases on this site will be users in countries such as India and Indonesia.
Good luck!
I would start with a book on J2ME and work from there.
Try Beginning J2ME: From Novice to Professional.
You could also download the J2ME SDK and play around with the example they give.
For tutorials have a look at the stackoverflow question https://stackoverflow.com/questions/584923/do-you-know-a-good-j2me-tutorial as mention in my comment.
I started with writing simple Flashlight application (choose how much seconds screen will remain lit) in NetBeans ME. And other app which I mange was Countdown with some graphics and sound. After that I found limitations too much annoying and now I'm waiting for my Android phone.
in short:
If you want to try it out - you don't need to buy books. There are plenty of tutorials around.
But, if you want to start deep development - don't waste time.

Categories

Resources