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

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.

Related

Emulating Android Drone Control App On Windows

I recently purchased a Yuneec Breeze quad-copter drone that uses an Android and iOS app with its own WiFi connection as a controller.
I am looking to write a Java application that performs the functions of the Android app with Game Controller support (the Breeze Cam app uses the touchscreen which means my big thumbs cover the streaming video) but am running into a roadblock.
While being proficient in Java, including network functions, I find myself woefully uninformed as to how to capture and read the network traffic between my phone and my drone. Its simply a skill I never needed until now.
Any place to help me get started?
OR -
Since I'm writing this in Java would de-compiling and hacking away at the Android source be a more viable option?
If so what decompilers are recommended?
In my experience these apps tend to be written in proprietary code. Android may be an open-source project, but the apps written for it don't have to be. It's unlikely you'll be able to write your own code to control the drone unless Yuneec provides an API/SDK to do so.
A quick Google search yields this thread on their forums: https://yuneecpilots.com/threads/api-sdk.745/
It's not much info, but it looks like you're SOL. Sorry.

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

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.

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.

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

Should I use Flash or Java?

I want to make some 2d games that I may want to submit to a game site, such as newgrounds.com. Even if I decide not to submit, I'd still like to know which is a better choice.
Which has a faster startup time?
Which performs faster in a 2d game?
Which IDE should I use?
Thanks in advance!
EDIT:
Also, a couple more quick questions.
I have used xna quite a bit, and silverlight a little. Where do I get started with flash? And what 2d libraries do i need? Also, is flash going to be anything like xna with an update loop and a draw loop?
The de facto standard for browser games is Flash. While there are game submission sites like ArcadePod.com that accept Java, most (including Newgrounds) are Flash exclusive.
Notably, Adobe Flash Pro and Adobe Flash Builder both cost $700.
Performance-wise and deployment-wise, Java using JOGL is probably the best I've seen in a browser.Check this out: https://jogl-demos.dev.java.net/applettest.html
That said, Flash and HTML5 should be hardware accelerated... at some point in the future. We should be seeing some very nice DHTML5 graphics libraries very soon. Combined with more Javascript-targeting compilers like GWT, I'm guessing that this is where we'll be seeing much game development in the future.
Definitley Flash over Java for in browser. Silverlight is also decent. Don't expect Flash or Silverlight to perform as well as XNA, as XNA makes use of the GPU with programmable shaders etc.
I recommend using FlashDevelop if you don't want to pay for any tools.
Realtime games in Flash use a loop. There are two ways of achieving this. The first is to create a Timer object and create a listener for it. The second is to listen to an ENTER_FRAME event (which is dependant on the Framerate you set). I personally use the second way of doing it. Since you can not guarantee the framerate its good practise to use a time delta to adjust values.
The best thing about Flash is there are a lot of mature engines out there, I will only focus on 2D ones here.
For physics, Box2D is the way to go, its a port of the C++ Box2D engine. Very powerful.
For keyboard input grab this class: KeyPoll
Depending on the type of game, the as3 game engine fixel might be useful
As for rendering, the simplest way is to use Sprites and Movieclips. You can draw programmatically, or if you use Adobe Flash Pro you can draw them by hand. An alternate way to render is to create a bitmap object and draw pixels to it.
I think it would be worth investing in a good book. For learning ActionScript3.0 everyone recommends Essential ActionScript 3.0 by Colin Mook.
For games development: Foundation Actionscript 3.0 Animation:
Making Things Move! and AdvancED ActionScript 3.0 Animation by Keith Peters are great. You can find his blog at Bit-101
And last but not least, a fairly new book The Essential Guide To Flash Games looks great but I have not read it yet.
Also if you search stackoverflow you will find similar questions about learning AS3 with links to online resources.
JavaFx is a very upcoming technology in developing both 2D/3D games and infact it gives same effect as Flash.you can have its libraries and inbuilt support IDE in Netbeans IDE.
I have developed both in Java2d/swings/graphics and Flash. Flash uses VECTOR Graphics which has a very good output irrespective of any screen resolution. Plus it will become fun and easier to design objects in flash rather doing everything by coding in Java.
That does not mean that you have everything ready in Flash. You still have to work with Actionscripts which obviously involves coding but it will be really fun once you learn it. You can always post your problems in this community where you have nice support for any actionscript related issues.
All the best!
If you are building a game, mass outreach is more important than any of the factors listed. Far more people have flash installed than JRE/Java Plugin, So I would advise you to go with Flash. Of course performance matters a lot, but getting people to play is more important.
For flash games, you can use Adobe creative suite or flex.
BTW, another good game development platform is MS silverlight, but thats out of the question too. It has even lesser market penetration than Java
Flash is better suited to 2D graphics rendering, was made for the browser environment, everyone has it installed and it's easier to learn than Java IMHO.
Here is a good way to get started looking for good libraries, although to be honest, Flash comes built-in with everything you "need", per se.
22 ActionScript 3.0 API's
Also, don't leave home without your API Documentation!
I'll try to dig through my history of API's and apps; it's been a while since I dabbled in AS3, but those were some nice times.
The sites you are looking to submit to will most likely take flash games over java versions.
I would recommend picking up flash its self and actionscript 3.
You may also want to pick up a free copy of the PushButton game engine which will take a lot of your development time away and allow you to focus more on actually building the games and not so much on getting the physics and collisions etc working.
http://pushbuttonengine.com/
In terms of user accessibility, I suggest flash.I believe it's easier to develop 2d games in flash...

Categories

Resources