How can I build programme based on nfc technology? - nfc

I'm trying to write a programme, that is going to use nfc technology to transfer data between phones. The problem is, that I don't really know how to start it, what language or libraries should I choose? Or maybe there are any other technologies, that will allow me to transfer data via touching phones?

You can write your app following the Android-Beam guide
It can be written in Kotlin/Java Language.
Note that from Android 10, Beam feature is deprecated.
Instead you will have a new feature called Fast Share that uses Wifi Direct and other methods of pairing rather than touching.

Related

Best language to build a Raspberry Pi User Interface

I would like to create a user interface to control a Raspberry Pi movable arm via USB. What is the best programming language to use that will allow me to create both a user interface and interact with Raspberry Pi?
With the question of what is the "best" you are going to draw too many opinions.
The question I would ask is ....
Where will the UI exist?
Native
Web
API
The "best" is probably the one you are most familiar with to be honest. With all the new tech these days (given there still are considerations) you should be able to deploy to any of those locations in a fair amount of time and get your UI to signal your robot arm.
As far as your hardware side of things, I think many frameworks in a number of the languages support a good number of those as well. Here are a few examples.
http://gobot.io/
https://cylonjs.com/
http://artoo.io/
I recommend using Tkinter in python for making a GUI. But, if you want to interface with the pi through the internet, you can use the https://thingsboard.io interface.
This tutorial shows you how to use guizero, which is a wrapper for tkinter(making it even easier to use) -
https://projects.raspberrypi.org/en/projects/getting-started-with-guis
You should also checkout the dedicated stackexchange forum for pi for more related answers-
https://raspberrypi.stackexchange.com/questions/1353/recommended-gui-toolkit-for-python-development-on-the-raspberry-pi

Functionality unique to Win32 API?

It seems that the Win32 API (the C API for native Windows applications) is becoming more and more overtaken by more modern frameworks and toolkits, including Microsoft's own WPF and Qt.
If the programming language is not a concern -- if you're not set on a managed environment, or a functional programming style, etc. -- does Win32 API bring anything to the table? Is there any functionality that one can implement with Win32 API that's not available with WPF or other frameworks?
I know it's possible to mix Win32 code into WPF/managed software, so one doesn't have to choose one or the other. But what are some examples of needing to break out Win32 API when developing a program in a higher-level language/framework?
Another more specific example is "windows hooks".
I needed to hook some socket programs at some point and the only possible way was windows api.
To elaborate i wanted to receive all communication received on some listening socket on a different one. Doing this requires hooks
Certainly.
All the frameworks are written in terms of the Win32 API. The frameworks cover 80-95% of what programmers need to do, but if you need really low-level control over something, you'll need to drop to the underlying Win32 API. Some examples would be:
precise control over text rendering (via DirectWrite),
detailed control over speech recognition using SAPI (there are literally dozens of interfaces not exposed through System.Speech),
low-level networking code (i.e., anything not HTTP related),
Practically anything audio related, if you're interested in performance.
... and don't forget about direct hardware access like "WinUSB" and debugging functionality (writing programs that act as debuggers).
The Win32 API is nowhere close to be taken over by any framework at the moment.
If that was the case, most of the API would not be updated by Microsoft. Instead, lots of new interfaces are added and updated.
There are framekorks like Qt, but, unless what you need to create is trivial, you will eventually use the API, especially for new graphics libraries, audio, video, usb, ribbon, sockets, network, COM automation, biometrics, encryption, digital signatures, security, scripting, etc.
Actually, most libraries are quite outdated and, while you can create an application that relies mostly on worker threads and not on the interface, building a nice, modern and useful application today certainly requires the API. So investing on a framework that would only cover a minimum part of your application is not worth the learning curve, these frameworks mostly target really new and unexperienced windows developers.

Best Language for cross-platform screen recording and streaming?

So I'm looking to build an application that will be able to record the users screen and stream it at the same time. I would like the application to run on both Windows and OSX. I don't have a high level of programming experience in any language, just basic understanding in C, C++, JS, (funny how each class you take in college wants a different language). I'm also pretty well versed in HTML and CSS but that is kind of irrelevant for this topic.
I've been looking around and it looks like the best solution is going to be writing the core of the program in one language, and then developing the Interface side for each platform differently, using appropriate languages and bindings for the different platforms (Objective-C and Cocoa for OSX and so forth).
I'm open to all suggestions, this project doesn't have a deadline or anything, I'm really just intending it as a learning experience. I've never done anything with video capture and streaming before, so I'm looking for suggestions as to which road to go down language-wise for this project.
Thanks in advance :)
the simplest solution that comes to my mind is to use VLC.
this is obviously not a "language" but an application, but it supports screen-capture and streaming on all of your target platforms (and more).
if this is not an option (e.g. because you don't want a separate application), you could use VLC's C-api for acquiring screen capture and use whatever you like for streaming.
if you want to only rely on native functionality, i would use C/C++ for the application and write the OSX part in ObjC/ObjC++ and Cocoa.

Is it possible to create an application WITHOUT a framework?

I was just thinking. C# has Winforms/WPF, Java has Swing and other frameworks, C++ has QT and so on; is it possible to create an application without using a Framework?
Putting aside the practicality of it, I'm just curious. How would one create an application that Just Works(tm) without needing external frameworks?
Two options come to mind:
Classical Win32 applications written in C. I don't know if standard Windows SDK API also counts as an "external framework" in your book, but that's as low as it gets.
DirectX/OpenGL games written from scratch with your own homebrew framework (not external, right?) There you get to do all the drawing yourself - although again, you use a pretty big library of primitive drawing functions.
If you want even less "framework", you'll have to code your own OS and drivers. :P
C# needs .NET Framework, not WinForms (which is an optional library used by some application). The same with Java.
Unmanaged (native) applications usually use some runtime library - the library of common functions. You can write a native application without any library - the compiler lets you do this, but you will need to (re)write lots of common functions, eg. for string manipulation etc..
Firstly, what is a framework?
Really a framework is just a bunch of code that is provided to you. You could, at least in theory, write the same code yourself. In that case you wouldn't be using a framework.
Your application can only do what the operating system allows it to do. Your program cannot directly manipulate the graphics card for example. So you have to use the APIs of your operating system in order to do anything.
So you are going to be calling into other code. (unless you write your own operating system). You will also being using another framework or api to get stuff done.
Yes. How: in the way that the frameworks you mentioned are implemented.
From a Windows point of view, you would register your window with Windows, then listen to window messages and react as required. Everything would be up to you - from drawing the window to building controls.

What GUI toolkit does Valve use for Steam?

What GUI toolkit does Valve use for Steam? Is it Qt? I am interested in using the same toolkit for a project.
According to Valve itself:
"VGUI is Valve's proprietary Graphical User Interface. All Source and Steam applications use VGUI to draw windows, dialogs and menus. It also handles localization: the displaying of text in the user's preferred language. "
That's interesting, maybe if you guys do some research you can have it working in your programming language. I'll download the SDK to see if I can make it work with Java :)
http://developer.valvesoftware.com/wiki/VGUI_Documentation
Having had experience with the Source engine I know that Valve have an library called VGUI which they use for all their games and many of their tools (when in game the library sits on top of the Source renderer, when in tools it sits on top of the Windows API I believe). Although I can’t answer the question with 100% certainty I suspect that this is what they use for Steam as well (I seem to recall some Steam updates that mentioned VGUI) – I would be surprised if the new beta uses a different library.
Even if it is not using VGUI, given what I know of Valve I would think they will have written something else entirely in-house.
So, it is (almost certainly) proprietary and highly unlikely to ever be available for third party use (unless you have the funds to buy a Source engine license).
Steam only runs on Windows and predates QT for Windows, so I'd have to guess something else.
Since Steam has had the same GUI since 2003, chances are it uses some variant of MFC. It also uses an embedded Internet Explorer web browser for its Store and Community sections.
However, I can't give any guarantees about what the version currently in Beta uses. It looks quite a bit different and includs the Webkit rendering engine instead of using IE. It may use Webkit for everything rather than drawing their own GUIs.
Does this answer the question?
http://games.slashdot.org/story/10/02/25/0640233/Steam-UI-Update-Beta-Drops-IE-Rendering-For-WebKit

Resources