How can we get the list of bluetooth enabled devices in Xamarin forms application? - xamarin.forms

I have followed the following URL : https://github.com/aritchie/bluetoothle
But I didn't get that much clarity, is there anyway to get he solution a bit easily ? I just need the list of devices and RSSI....

I'm using plugin from https://github.com/xabre/xamarin-bluetooth-le. To scan the list of devices:
adapter.DeviceDiscovered += (s,a) => deviceList.Add(a.Device);
await adapter.StartScanningForDevicesAsync();
There is also a sample app in the plugin source code for reference.

Related

Xamarin Forms - Native Forms

I am trying to experiment with Native Forms in XF. I have this in iOS working right. That is fine.
In Android, I am getting the following error:
'MainPage' does not contain a definition for 'CreateSupportFragment' and the best extension method overload 'PageExtensions.CreateSupportFragment(ContentPage, Context)' requires a receiver of type 'ContentPage'
The code is erroring in the following code:
var _cp = new MainPage(); // my page from XF.
_list = _cp.CreateSupportFragment(this);
I have made sure that my nuget packages are up to date. I have cleaned and compiled. I've done a bunch of things, but alas, no love. Any ideas on this?
TIA
you need add the line to head of source:
using Xamarin.Forms.Platform.Android
because CreateSupportFragment is an extension method defined in it.

SuiteScript 2.0 Intellisense create search filter

I'm just starting out with suitescript, and I was wondering how to get the intellisense to work in suitescript 2.0 on creating a saved search.
I know this is easy to do on the netsuite UI but I would like to learn how to do it in Suitescript. Here is example code below. I'm trying to use ctrl + space to show options on the Customer type. I've tried adding ['N/record'] and it gave me options on records.Type.(here were the options) but I can't get it to give me anything inside the filter single quotes.
define(['N/search'],
function(search) {
var MYsearch = search.create({
type: search.Type.CUSTOMER,
title: 'My Customer search',
filters: ['', '', ''] // here is where i want intellisense
})
as a side question: Does anyone know a good place for suitescript 2.0 questions and answers? stackoverflow seems to be lacking. I'm assuming because it's pretty much brand new.
(I know of all the tutorials on the help center and SuiteAnswers)
Thanks for the help!
UPDATE: It looks like Netsuite 2.0 doesn't like Internal IDs... hope that helps.
I usually just create an array for filters, and another for columns, then add my filters to that array like sovar arrFilters = [];
arrFilters.push(search.createFilter({
name: 'mainline',
operator: search.Operator.IS,
values: ['F']
}));
arrFilters.push(search.createFilter({
name: 'trandate',
operator: search.Operator.WITHIN,
values: 'lastMonth',
}));
var arrColumns = [];
// invoiceid
arrColumns.push(search.createColumn({
name: 'internalid',
join: 'appliedtotransaction'
}));
Then you can just use your
search.create({
type: search.Type.VENDOR_PAYMENT,
filters: arrFilters,
columns: arrColumns
});
Hope this helps.
Download the latest SuiteCloud Developer IDE or the Eclipse Mars version (just make sure you have downloaded SuiteCloud plugin SuiteCloud IDE - http://system.netsuite.com/download/ide/update_e4). With this IDE, you will be able to have API code assist for SuiteScript 1.0. However, there is other setup to enable it for SuiteScript 2.0. Also, this will enable you to have intellesense for native fields.
Then if you want to include custom fields/columns, setup your master password at main menu >Netsuite>Master Password>.
Get the list of your accounts from the production, sandbox, and beta environment. Do this at main menu >Netsuite>Manage Account>. If you will be added to a new customer account later, you need to add it manually by doing this step again to reflect it.
Now, you need to connect your project folder to NetSuite account. But first, check the project setting by right clicking to the project folder>NetSuite>Change Project Settings>. Then, make sure you will be using the correct account.
Then log-in to the account by right clicking the project folder >NetSuite>Log in to Project Account>. Once successfully logged-in.
Finally, right click again the project folder >NetSuite>Sync Script IDs from Account>. Follow the instructions and select record type and fields.

How to run Openstack-Swift java api?

I try to run Openstack-Swift java sdk sample.
I have swift and keystone project to use swift only.
I found this project : https://github.com/woorea/openstack-java-sdk
But, I don't know how to run this project in Window Eclipse.
Should I build all project(nova, etc..) in maven?
Do you know how to run this project or website that post run-way in regular sequence?
#stream
I have not tried Woorea but i know a lot many developers are using Jclouds, the link http://developer.rackspace.com/#home-sdks has well documented guide with example how to use the Java SDK.
Hope it helps.
looks like you can build SWIFT independently (part of woorea peoject)
as it states in the readme file here:
(com.woorea swift-client 3.0.0-SNAPSHOT)
https://github.com/woorea/openstack-java-sdk
the Maven artifact ID should be:
openstack-java-sdk
Here is a nice toturial that can be of hand:
https://github.com/woorea/openstack-java-sdk/wiki/Swift-Tutorial
it has the example for the java api for using SWIFT,
for example, this code snippet (more details in the link):
Properties properties = System.getProperties();
properties.put("verbose", "true");
properties.put("auth.credentials", "passwordCredentials");
properties.put("auth.username", "demo");
properties.put("auth.password", "secret0");
properties.put("auth.tenantName", "demo");
properties.put("identity.endpoint.publicURL","http://192.168.1.43:5000/v2.0");
OpenStackClient openstack = OpenStackClient.authenticate(properties);
AccountResource account = openstack.getStorageEndpoint();
account.container("hellocontainer").put();
account.container("hellocontainer").object("dir1").put();
account.container("hellocontainer").object("test1")
.put(new File("pom.xml"), new SwiftStorageObjectProperties() {{
setContentType("application/xml");
getCustomProperties().putAll(new HashMap<String, String>() {{
put("customkey.1", "customvalue.1");
}});
}});
List<SwiftStorageObject> objects = account.container("hellocontainer").get();
just keep in mind that when using openstack's API you will most likely need to authenticate (get tokens etc..) so that you will need the Keystone lib as well
www.programcreek.com/java-api-examples/index.php?api=com.woorea.openstack.keystone.Keystone
hope this helps.

How to integrate barcode scanner directly on my app?

Does anyone here knows how to to integrate barcode scanning directly into an application without having the separate ZXing application installed?
The complete source code to Barcode Scanner is here: http://code.google.com/p/zxing
As a developer of the library, I can tell you that two things happen in 95% of cases where someone tries to integrate our source code into their app:
They find it's quite a bit of work to adapt the code and integrate and maintain the scanning in their own app, and they use the Intent API
They copy and paste our code and try to make "their own" app this way
I can tell you we do not want developers to copy and paste our source code. And unless you're an experienced Android dev, you will have trouble re-inventing a scanning app on your own
Bottom line: save yourself the trouble and integrate via Intent: http://code.google.com/p/zxing/wiki/ScanningViaIntent
try to use the Google Chart tool api its very simple, i have a function that i wrote a while back:
function get_QR_code($content = null,$size = null,$ImgTag = true){
if ($size == null){
$size = '150x150';
}
if ($ImgTag){
echo '<img src="http://chart.apis.google.com/chart?cht=qr&chs='.$size.'&choe=UTF-8&chld=H&chl='.$content .'">';
}else{
return 'http://chart.apis.google.com/chart?cht=qr&chs='.$size.'&choe=UTF-8&chld=H&chl='.$content;
}
}
<?php get_QR_code('Hello form Google API'); ?>

Web based visual query builder

I am after a visual query builder along the lines of http://ajax.easyquerydemo.com/. I am using ASP.NET but MVC so would rather something that is not WebForms based like the one in the link. If anyone knows of similar tools that are largely platform agnostic please let me know.
Was looking for the same sort of thing, came across this http://devtools.korzh.com/query-builder-component/ which looks very interesting to me...
Easy Query Builder supports MVC, they have a pretty slick MVC Demo, and a non-expiring trial.
Activer query can do all the thing you want:
http://www.activequerybuilder.com/product.html
Try www.ajaxquerybuilder.com
Even i search for it today and created a list:
1) Query builder
http://aspquerybuilder.net/?_ga=2.150945718.1618902383.1522751533-1013206784.1522751533
price : https://www.activequerybuilder.com/purchase.html
2) Active query builder
Demo : https://webapi.activequerybuilder.com/Demo
Free to use.
3) Custom code
https://www.codeproject.com/Tips/1060170/User-Responsive-Web-Query-Builder-using-ASP-NET
4) DataSparc: Paid service
Demo : https://www.datasparc.com/dbhawk-online-demo/
5) Jquery query builder: Free to use.
Demo: http://querybuilder.js.org/demo.html
GitHub: https://github.com/mistic100/jQuery-QueryBuilder
6) DevExpress.com
Demo : https://demos.devexpress.com/ASPxGridViewDemos/DataBinding/QueryBuilder.aspx
Documentation: https://demos.devexpress.com/aspxgridviewdemos/DataBinding/QueryBuilderControl.aspx
We use DBHawk from Datasparc. It provides query builder and execution.

Resources