Need help with a working example of native android bluetooth support for codenameone apps. I have one working in android but having a problem integrating with codenameone.Thanks in advance.
If you have working code in Android already, you just need to create a Native Interface to handle the API calls and callbacks you need. You'll be able to use most of your Android code, a few modifications will be needed to strip out the parts that control the UI. Check the developer guide, it discusses this. I believe that there's also a tutorial video.
There is also a CN1Lib or extension for Bluetooth Low Energy, if that's what you're developing.
Related
As Sinch API provides Video calling capabilities, I would like to know Sinch API will work with IOS, Android Apps developed using Codename One API. If yes, please refer any documentation.
Codename One supports native interfaces so you can integrate support for pretty much everything. This is explained in https://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html[this video] and in the developer guide.
There are some open source native libraries you can use as reference. Mina seems to be working on porting OpenTok to Codename One which might be interesting to you.
I'm making an app for Android and UWP that connects to a barcode scanner over bluetooth, but I'm really struggling getting the right lib or something because System.IO.Ports isn't available.
I also tried to implement both in some abstraction library, but it seems difficult. Is there someone who can help me out?
Thanks in advance
You need to create different implementation for different platform.
For Android platform, there are some discussions, for example:
Xamarin forum question
Connecting to a Bluetooth Scanner with Xamarin Android
For Universal Windows Platform, the Barcode Scanner API is the right thing we need to use. Please notice the Remark part in that document.
The official Barcode scanner sample is a good demo for beginner.
A bit late but... I am using this Nuget Package:
https://github.com/inthehand/32feet
It supports Classic Bletooth and Bluetooth BLE, and it works both on Android and iOS. The project is supported at this date and it is very well documented.
I see a lot of tutorials in the Internet teaching about android to browser or browser to browser webrtc application. Is it possible to build a native android-to-android video chat app using webrtc?
Well, for establishing a connection between the devices before the call via peer-to-peer WebRTC solution you need STUN/TURN/ICE servers.
They establish the route for communication between the devices.
Once the route is established the devices communicate directly without participation of a server for passing the media streams.
To make it easier for you, you can look at or try some existing solutions, like ConnectyCube.
They have peer-to-peer WebRTC solution for Android already implemented.
So, maybe there is not need to reinvent the wheel.
There is an official Android sample project AppRTCMobile provided here - https://webrtc.org/native-code/android/. However, the build process is tedious and the total download size exceeds 20 GB. The recommended way is to use the following dependency in your project.
implementation 'org.webrtc:google-webrtc:1.0.+'
However, for video chat functionality you will need to refer AppRTCMobile source code. There is a clone of this project on GitHub updated for Oreo and ready to import in Android Studio. Check out this link.
WebRTC uses ICE protocol for creating connection between two peers. It uses DTLS-SRTP for creating secure data exchange between peers.
Now both ICE protocol and DTLS-SRTP are protocols that can be implemented on any devices no matter what platform. You implement or use existing implementation of
ICE and DTLS-SRTP protocol on your android apps and communicate with each other.
When you read tutorials about implementation of WebRTC for communication between android app and browser, there the android app has the implementation of both ICE and DTLS-SRTP. So this android app can communicate with other android app having similar implementation.
in addition to #tahlil great answer, you can also use a number of open source SDKs out there that already took the burden on bundling the WebRTC libraries and offering simple APIs for you to integrate Real Time Communications in your native app. One example of such SDK is the RestComm Android SDK
See https://github.com/Mobicents/restcomm-android-sdk and http://www.telestax.com/restcomm-client-android-sdk-beta-2-is-out/
What are the available API or existing technologies on android that can help one make call using the internet, more like VOIP. I checked out documentation online including this
. Kinda confused where to start. Can anyone help with a better guideline ? Thanks.
PJSIP is one of the better media libraries available on Android. you may want to google the pro and cons of this vs the native android SIP Api and based on your project pick one over the other.
There are a few others, but PJSIP is one comprehensive solution.
There are plenty of support for VOIP on android. You can try the following options
For Android 2.3 or higher you can use inbuilt SIP stack Documentation here
PJSIP (example implementation Project for Android is CSIPsimple)
MJSIP (example implementation Project for Android is Sip Droid)
Doubango (example implementation Project for Android is IMSDroid)
Linphone
I have used almost all of the above and they all are good and do the intended.
There are plenty of Paid SDK in market too which promise to do the job for you.
I need to do product bar code scanning. I would like to know how to integrate this functionality into my own custom app? Should I write an activity to do this that uses some library? If so what library? or could I call an app that already has this capability from within my app?
The Zebra Crossing project is probably a good start. Apache 2.0 License and clients for android, java, and I think ActionScript too.
http://code.google.com/p/zxing/