I'm preparing to deploy a game developed using LIBGDX for both android and Desktop computers. Is there a way to put ads in a desktop application? I'd like to generate revenue from the desktop ads too.
You'd have to stick a browser widget in your desktop application and display adverts in there. JEditorPane's HTML support is pretty primitive, however, so you'd have to search for an embeddable Java browser or a custom subclass of JEditorPane which supports modern HTML (I think JEditorPane support stops at HTML 3.2). There are some freely available alternatives just a Google search away.
Off the top of my head, I can't think of any advertising networks geared towards desktop applications at all, so the browser approach is probably your only real shot at doing what you want.
Related
I am making an application in java which would be showing a HTML web page, getting the address of the webpage from a config file. The web page will be on the local disk. Now what i want is, when i start the Java program, the program will be showing the the webpage fullscreen on the computer without the mouse cursor. Now for that i would be first needing a HTML Engine or a web browser which can run inside the java application(events liek press of button etc etc will be passed to the web page from the java application). I cant find a way to show these web pages. I would be needing to show current tech web pages , such that it can process everything from jQuery, Js, Ajax, CSS3, HTML 5. So that beautiful web pages are able to be shown through the Java program.
JxBrowser is a good api for such purpose. It uses the chromium engine which offers an optimum speed just like native browsers. I have used it and it worked for me
Maybe you can give a try to jxbrowser
It promise to be a very good component.
From the home page:
Embed a lightweight Chromium-based Swing component into your Java
application to display modern web pages built with HTML5, CSS3,
JavaScript, Flash, Silverlight etc.
This is possible if you're willing to use javaFx.
I'm not sure to which extent the latest html5 and css3 goodies are supported, but it's a decent browser enough : java fx WebView component
You can try using the SWT Browser control if your application runs on Windows.
It wraps the currently installed Internet Explorer and gives you a very powerful access to its functionality including event listeners, etc.
I am part of a student project working to create a free educational chemistry browser game, but we can't decide on which plug-in to use (Flash, Java, Unity...).
The game will consist of 2d graphics and short movie-scenes and it will mainly be a drag-and-drop game.
We want it (the plug-in) to be supported for the next several years and compatible with most (if not all) PCs and tablets - so Flash is already out of the question.
We're horrible programmers, but we have some funding, so we will outsource the actual programming, which means that it is also relevant whether we can find people able to work with the plug-in.
So which plug-in would you recommend to our needs? Pros and cons are very welcome.
Also please do tell if I've left out some relevant points!
I think the best option is to avoid plugins entirely.
Apple iPad and iPhones don't support flash as you know, but they don't support any other plugins either.
Flash is supported on most (but not all) Android tablets and phones up to and including Android 4.0. But Adobe (makers of the flash plugin) have discontinued it and said that it will not be supplied for Android versions above 4.0.
Even on Android 4.0, users who have installed and are using the Chrome browser instead of the default browser, will not be able to view flash because even though the Android 4.0 OS might have a flash plugin, the Chrome browser when installed on Android 4.0 has not been designed to use it.
Android apps are written in Java, but the Android web browser doesn't actually include a plugin for running Java applets. Plugins are basically being phased out across the board, regardless of the OS or browser.
The best strategy:
To reach the widest number of users
Regardless of the type of PC, tablet, or browser they use
And which will not result in the game becoming unsupported by browsers in in the long term
is to design your app using web standards.
These days, HTML 5 Canvas, CSS, JavaScript, and other technologies, which have been standardized to be supported across all web browsers, allow complex animations/graphics inside the browser, support drag and drop, and support playing video, without using any plugins at all. You could look at outsourcing development to a team which knows these technologies.
Since you are also looking at video, be aware though that there is an ongoing debate surrounding the <video> tag in HTML 5 (the feature which allows videos to be played without plugins). Basically it has been agreed that all browsers will allow videos to be played without plugins, but the actual format of the video which the tag should support, was left out of the standard (due to disagreements) and so has not been decided.
The candidate video formats being debated include WebM/VP8, H.264/MPEG-4 AVC and Theora.
The workaround to this issue, is that the HTML 5 <video> tag allows you to list multiple sources for a video (i.e. multiple files on your server, all for the same video but in different formats). So if you save your videos in the most common formats, the browser can then choose the best format that it supports.
The HTML 5 video format debate therefore would not impact the design of your game (much), it just might give you a headache in needing to save videos in multiple formats. If you do this then your game would have wide compatibility across all of the major browsers.
I heard that we can use Adobe Flash Builder to develop apps for android. But I have a doubt, can we create any type of application? are there any limitations to adobe flash applications?
I know flash is good for games and internet applications.
I am confused, which is better for android app creation? Java or Flash?
Advantages of using Flash:
One code base, many (iOS, Android, Blackberry) platforms
Easy navigation between view (as iOS does not have a hardware back button)
Good for apps which serve as a front end for RESTful web services
Supports gestures, camera, vibration, contacts
Disadvantages of using Flash
Performance takes a hit when you try to do image processing and other heavy stuff
Cannot access front camera
Doesn't give you as much control as Java
Advantages of using Java
Can exploit Android OS to its fullest
Performance is better in case of complex apps
Disadvantages of using Java
Cannot use the code-base to target other platforms
IMHO, it depends on the use-case of your app.
Major disadvantage: Adobe has announced that they will stop
developing/supporting Flash on Android
It'll be a long time before desktop will follow, considering that most users are IE users (Google analytics supported) and remember that IE9 still has VERY limited support for HTML5 where as Flash has 99% global cover on PCs.
So until such time as all browsers have much more HTML5 support, Flash will still be here for a while - whether it's here for good, perhaps not - but Adobe are already creating their new Flash Development tool to output HTML5 as well as SWF files. But like all file types, they will eventually have their day - but it's not yet that time.
java with android sdk is 100% and Flash with adobe air is 70%(approx).becase adobe provide same functionality like android sdk useing "Native code" but some functionality that cant allow by flash.
another thin is that version problem.you can continue with 2.2 or higher.
some Broadcasting functionality are not there
Advantage::
flash game building are easy and just 2 to 3 step to convert it into apk or iphone formate.
Major disadvantage: Adobe has announced that they will stop developing/supporting Flash on Android. Desktop flash will soon follow. So if you are starting a new project, unless its expected lifetime is fairly short, forget about Flash.
I'm working on a large website project that makes heavy use of in-page graphing of data. To make the graphs interactive (the old paradigm was to post data to the server, have the server render the graph as a jpg, then send it back to the browser) we've started building the graphs in Java. It's a smooth system, but the website is still very much computer-dependent.
I'd like the site itself to work as a device-aware web application - switching layouts based on user agent strings to render a mobile-optimized version for cell phones and PDAs. But I'm concerned about the nebulous support for 3rd-party applets (Java, Flash, etc) when it comes to platforms like the iPhone.
So if you were building a web application that could be accessed either through a standard web browser or an iPhone/Blackberry/Palm device, what would you do to still display interactive graphs? Is there a workaround for using Java on the iPhone? Is there another platform we should pursue all together?
If you want to support more browsers, you may want to look at using Javascript to help decide what to do.
You could generate the graphs using the canvas element, and if the browsers doesn't support that element then you could use a Flash app, and if that doesn't work, have the graphs developed on the server and use the <img> tag and just refresh.
This third approach could also work if the browser doesn't have javascript enabled.
This way you can handle the various situations and get away from having to run Java in the browser.
The iPhone and Android browsers support HTML5 features such as "canvas", which you may want to look into. The browsers on BlackBerry phones are somewhat behind the times - they are finally releasing a WebKit-based browser for their upcoming 6.0 OS but all of the current in-market devices are quite limited in terms of browser capabilities. For those devices you're probably best off just using a static server-generated image.
I would use a JS charts library and gracefully downgrade to images when you detect an older browser.
I have seen a lot of people try to make a web ui looks like a desktop ui. However, most of the time i feel web ui is much more interesting than the desktop ui, with the help of javascript toolkit like jquery, gwt-ext etc.
My question is, how to port the web ui to desktop ui? Do I need to embed a javascript engine in java? css engine? html layout engine? That sounds like a lot of work to do.
Any easy way of doing this?
you can embed a web server in your app and you can embed a browser inside your app window. i know eclipse does this pretty well. it uses SWT to do the heavy lifting
http://www.eclipse.org/swt/snippets/#browser
check the Browser section
your web server doesnt even have to be a proper web server, it just has to set the content, and can query / change it on the fly. the javascript on the page can even interact directly with your app.
you should be even able to use crazy web frameworks like
http://echo.nextapp.com/site/
or
http://code.google.com/webtoolkit/
or even run a ruby site through JRUBY
or make really complex apps using the new HTML5 engine [canvas/video tags] (if your client has the new mozilla installed)
Adobe AIR technology solves this exact problem. The code you develop using Flex can be rendered in the Flash player plugin of a browser or the same code can be easily packaged as a Desktop application that runs on the AIR runtime.
Have you seen Appcelerator's Titanium Desktop
This is one of the best solution for you (i think!)
You write the javascript and html code, and the titanium SDK creates the Desktop application of the same
There is support for Python and Ruby.
Must try :
http://www.appcelerator.com/products/titanium-desktop/
if you are a Ruby programmer then you must also see this
http://www.rubyinside.com/bowline-rails-for-the-desktop-2183.html
Prism from Mozilla is made for this goal, exactly. It's out of beta now too, I believe.
Check Google Gears y Adobe AIR
It not 'a lot of work to do', it's a huge amount of work to do - you would in effect be writing you own browser and it'd never come close to the poplar ones out there, simply because you wouldn't get the level of feedback something like Firefox gets.
If you're trying to avoid address bars, menu bars, etc these can be switched off in all the popular browsers and so to the user the appearance would be that it's more application like with only the rich content of the HTML visible.
Sounds like JavaFX would be good for you?
http://en.wikipedia.org/wiki/Javafx
Try XULRunner from Mozilla. If you have developed extensions for Firefox, then this is the exact same thing. XULRunner contains the Gecko engine, so it can render XUL and HTML with CSS, and it supports JavaScript with many useful XUL Components, like file read and write, directory browser and network tools.
Because it supports HTML you can in effect make a webpage and have it run like an application. Also it is cross platform, so it will run on Windows, Mac and Linux, anywhere Firefox runs actually.
There is some information on creating XULRunner applications on the net, but since it's so similar to making Firefox Extensions, you can just google for that. A good Tutorial for getting started is this one.