Is it possible to print from my CN1 app to a WiFi printer?
I don't want to print files. I want to print tables filled with data from my users.
I noticed this question from 3 years ago. https://groups.google.com/forum/#!topic/codenameone-discussions/RIizxJNZBHU. Hopefully there is something now. Thanks
There is nothing new about this as it's a pretty niche requirement. When it was asked printing support was remarkably rare and now its just rare.
You can use a webservice like Google Cloud Print or use native interfaces to integrate with the printing API's e.g. see the developer guide sections about building cn1libs and working with native code: https://www.codenameone.com/manual/advanced-topics.html
Related
I am posting this question as I would need some good advice to start building my very first app.
First, I'd like to share the aim of the app: being able to take pictures from (different) mobile devices' cameras, having a graphic (like a mask, an image) showing up when looking into the camera. The intent is to have a virtual car which I can place next to real people when shooting my pictures, see the preview and save them.
My first thought was, not to cover how to build apps for different specific devices (e.g. android, iOS, windowsphone), to make a web app. I am fairly fine with programming and web frameworks in general. Is it a reccomendable way to go?
Then, I would like some advices on the lanuages I should use. I am using a linux pc and have understanding in HTML, CSS, PHP, Python, and a bit of JavaScript. Would this be enough?
Can you point me to some useful link/tutorial?
Thanks in advance and sorry if the question is broad, I hope my points are specific enough to be answered without too much pain.
As far as i understand your question, you want to konw about web technologies wich provides you access to camera.
Whrer is an special method, thats returns object in JS, thats can capture camera and mic data:
navigator.getUserMedia()
but it requires sequre protocol https for you server.
You should read about them. In this way, you cat get data from device's camra vai js object, and process, share it as you want.
I am trying to create a mobile P2P game with network library written in c (enet/libuv).
I have read in some forum that there is risk of blocked port by the router and I need to do something called port-forwarding.
Most of the topic related are for console games and I'm trying to do mobile game, which theoretically should be the same.
Sorry for my noob question but, will it be a big issue for my game and how can I fix this problem (without using any third-party help) ?
Many thanks for the help.
My goal is to write a desktop application created through Visual Studio which uses HTML5 and AngularJS to display a well put together front end to the user but which also allows for me to use VBscript so I can do read/write items, send things to the printer, and compose/send emails from their outlook automatically.
Can this be done and which options should I select when starting my project? I can not have this run through a traditional web browser since I am doing the above mentioned items which browsers won't let me do.
p.s. I just download VS 2015 community today. I have spent the day researching and finding lots of helpful information but nothing which answers this.
You don't need VBScript
You should check out Electron, with which you can develop desktop applications in Javascript / HTML5, and maybe, an AngularJS - Electron seed project to speed things up.
Now if you consider Electron, you can check out this answer about printing with Electron.
If you want to persist in this (which seems to be the best course of action in my opinion), you can find any informations about how to do this and that with electron by reading the docs, tutorials and basic google searches.
Don't hesitate to come back to SO if you have precise questions regarding code you already have.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
We're the developers of a relatively complex non-game iPhone 3 application, and we're beginning an ambitious rewrite to take better advantage of iOS 4. There's a significant social element to the app, so we started thinking that we'd like to make it available on as many modern mobile platforms as possible:
iPhone/iOS
Android
Windows Phone
BlackBerry OS
Symbian
There are several approaches to cross-platform development, and they all have limitations. No solution manages to take advantage of all a device's functionality the way a native application can. Given the complexity of our app, I'd simply like to maximize "logical" code reuse without resorting to a cross-platform framework. I'm envisioning tools that will make developing and testing apps against multiple platforms a little more seamless. What can we do to make developing on 5 platforms take less than 5 times the effort?
Push as much of the functionality as you can back to a shared web server, and try to make only the UI specific to the platform.
I know you said no cross-platform frameworks, but perhaps something to look at:
Write all the core logic in javascript. Unit test that at will. Then use tools like Appcelerator to turn that logic into native code.
Then import that logic code into your native platform projects for each of those platforms, and build out the other features you feel can't be achieved properly in any other way.
For platforms they don't support right now, you might be able to find a js to native code converter, or indeed a way of hosting a js environment within those platforms.
None of these will play nice together. It's not in their perceived best interest to do so.
The best bet is to dumb everything down and keep it simple. Simplicity always wins when you are trying to sandbox multiple hostile interests.
Look to XML for all data, and then have 5 binaries to read it or push it all to a web server via PHP. All these mobile platforms will function nicely with XML because it's in their best interest to do so. Worry about branding and appearances AFTER you get the core functionality off the ground.
NOTE: Javascript is the last thing you should be looking at in the beginning. It rarely plays nicely on all platforms in the same way. So make sure that your JS layer is independent of your data layer. DO NOT INTEGRATE THEM. That would be bad. You want your Android JS to be potentially different than the JS you push on the Blackberry for example. Because you won't know how quirky it will end up being until you try it out and test your methods.
I agree with Beth. I have developed a product based on the same thought process. I have a java server running on a socket, which has a client library that client app's use to connect to the server. The client abstracts out the socket piece and provides easy api's for client apps to call.
The server is equipped to handle multiple client connections in parallel, thread pool concept.
Now, since it will be a java client library, you can only run this on android. To get this working on other platforms, you can run this client piece on J2EE. This way you create a third middle layer. All other platforms can then connect using the browser.
With this done, you can now use JSON to Object libraries to expose your object (on the server side) to JSON. I haven't done this yet, but will do it in a few weeks.
Btw, I just cant get myself to use any cross platform frameworks. They promise the world, and dont mention any of their limitations upfront. Its painful towards the end of your product/app release to find out all these limitations/hidden costs.
Well, you can look at JQTouch, SensaTouch or maybe wait for a while to see the jqueryformobile to finally get published. If you are not in a hurry, I would already start working in jQuery, since two out of three from this list are (will be) based on jQuery as plugins
I'm currently thinking to this problem , and my solution would be to put all the logic server side and use an approach like Model-View-Presentation, a series of events fired by the UI that should instead be specific for the client
I have only very basic experience with HTML/CSS and have quite a bit of experience with testing software and web apps from a consumer perspective. I'd love to launch a web application that plays nicely with Google services, similar to some of the apps you'd find on the Google Apps Marketplace, such as ManyMoon, time to note, Socialwok, etc. I'm a huge Google fan and would like to build something that's well integrated with other Google services.
If you were a total beginner and wanted to build a complex app like one of examples above (project management, CRM, etc), where would you start?
If you worked your ass off 18 hours a day, 24/7, how fast could you do it?
I've dabbled into various languages and development frameworks, and read about which apps are using what languages but it's hard to figure out what would be most beneficial to jump into. Ruby on Rails, PHP, Google Web Toolkit, AppEngine. The list goes on and on. I want to be able to build and launch my own scalable web app.
Thanks.
One bit of advice: There is no shortcut for proper experience. It took me 4 years to come to a point where I can build enterprise level web apps - even though I had the dream of building one immediately, right from the beginning. Start small and build your way up.
Even though I did hate this advice when I was receiving it... Don't try to build the next Facebook platform right now.
Now, to answer your question:
Skills:
You must be absolutely clear about server-client interaction with respect to HTTP. You will never understand AJAX fully without understanding HTTP and behind the scenes of browsers. Note: being clear and knowing everything are two different things. Be clear about HTTP.
Learn about HTML/CSS and JavaScript standards to some extent to know that they bahave differently in different browsers. In the grand scheme of things, they are not that important if you are okay with some framework that handles these for you (I recommend JQuery and JQuery UI).
Learn a little about Linux, Apache, PHP.
How to go about it:
To develop web-apps, you could start with the LAMP stack - Linux + Apache + MySQL + PHP.
First build a small web app that does something trivial - like saving and retrieving user's stuff using AJAX and a nice UI or something. I'd recommend jQuery and jQueryUI for JavaScript and UI frameworks.
Then, build a small web app that just gets data from some Google service, given a user's credentials.. I am not Google expert but I guess Google provides APIs for some services(?).
Then build an app where two people can share their data coming from a Google's service or something to that effect.
Then add your own fancy stuff.
It goes on like that.
If you are a .Net person, you could go with.. Windows + IIS + MS SQL Server + ASP.Net3.5/VB/C#. Guess what? StackOverflow is build on that stack :)
Learning about and using an MVC framework is also a good idea - ASP.Net MVC or something similar for PHP.
Minor clarification - By Google-friendly did you mean SEO-friendly? If so, Google-friendly and web-app don't go well together.
It makes sense to build a Google-friendly website not a web-app.
I would start by
brainstorming a hands-on project
identify the skills you will need to achieve it
learn them as you work through the project
set progress goals and celebrate small victories
For most people 18 hrs/day 24/7 sounds a little overly optimistic. A reasonable goal would be to form an interesting project idea and research the needed skills the first week, work through a few tutorials and maybe apply your own functionality the second week, build something 'complete' the third week, then take a step back and take another look at your original goal.
As far as choosing a project, I find a notepad helps. I'll be somewhere and think, 'wouldn't it be nice if...' and I'll go look for a solution that provides that 'what if' and find it doesn't exist. So there you go.
I would also have a look to one of the top voted questions here on Stack Overflow:
What should a developer know before building a public web site.