Is it possible to embed conditional actions into barcode - mobile

I would like to know if it possible to create a barcode that contains conditional logic.
if (x == true)
do this
else
do that
The context would be someone using the camera on their mobile device to scan a barcode.
Taking the pseudo-code from above and applying it to my particular use case the scenario becomes:
if (mobile device has particular mobile app installed and active session is detected)
open mobile app to particular module and update something
else if (mobile device has particular mobile app installed and no active session is detected)
prompt user to authenticate, followed by opening module and updating something
else
prompt user to download and install mobile app
A) Is this possible?
B) If yes, is there a particular set of barcode types (e.g. 1D and/or 2D barcodes) that would need to be used in order to achieve this?
C) Is there a limitation to any particular mobile device that could do this (e.g. platform dependence)?

Related

Google smart home action : where to trigger a requestSync?

I created a smart home action and I have to implement the requestSync feature for certification.
But I don't understand from where to call it : from my backend fulfillment ? or from elsewhere ?.
In the documentation, I saw :
You must trigger a SYNC request:
- If the user adds a new device.
- If the user removes an existing device.
- If the user renames an existing device.
- If you implement a new device type, trait, or add a new device feature.
But all these user interactions are from the Google side (in the Google Home app), so I don't understand why Google doesn't trigger the sync itself, and how could my backend know that the user changed something ?
Can someone help me with this feature ?
Thank you !
But I don't understand from where to call it : from my backend fulfillment ? or from elsewhere ?
It definitely should come from backend.
But all these user interactions are from the Google side (in the Google Home app), so I don't understand why Google doesn't trigger the sync itself, and how could my backend know that the user changed something ?
This isn't a case to use the "requestSync". And your backend doesn't need to know about it if your users operate their devices from Google Home app
Here I will explain some example use case for you.
Imagine that you have your own application for controlling your devices. Then you develop the smarthome action project to make your device be able to controlled over voice. When your devices are linked with HomeGraph and you change your device's name, add or remove it from your own application. This is the time that your backend system should make "requestSync".
Even if your system doesn't allow user to make such of those changes on the device unless using Google Home app, google requires your system to be able to send them the "requestSync" for the case that when you "Implement a new device type, trait, or add a new device feature". This is the way that allows you(as developer) to update your users' devices without them(your users) unlinking and relinking their account.
And if you are not clear about "Implement a new device type, trait, or add a new device feature". Just thinking of case that you want to add more traits for your devices and you want to make update on all devices that has been linked before to be able to use a functionality from your new trait. You will need "rquestSync"
Hope this help. Goodluck :)

Having signing issue when running react native ios app on physical device

I am having trouble in running react native ios app on physical device:
For installing the react-native app on your physical device, you should use Xcode!
So, open Xcode and press (Command +,) to go to preferences.
Then go to the Accounts tab and click on the + button, then click on Apple ID and sign in to your apple id.
After all of this follow the picture
On the fourth step, select your apple id and let apple sign your free development account.
If you got this error :
Failed to create provisioning profile.
The app ID "YourAppBundleID" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
you need to change your Bundle Identifier value, for example, add .ios in the end of your Bundle Identifier.
After signing you need to select your connected device from the select box beside play and stop button :-)
Also, you can set your build schema to Debug or Release mode.
For set your schema you have to press (Command + Shift +,), then click on play (run) button and then you can change Build Configuration there.
And finally click on play(build) button.

JHipster angularjs application - Want to perform the login operation with mobile number instead of username

I am new to jhipster, so I just created a jhipster application with angularjs and spring. I want to perform the login operation with mobile number instead of username. I have already created a mobile number field during registering new account but on login screen I am not able to find the query where I can change username with mobilenumber.
Basic monolithic app setup is made with yo jhipster.
Thanks in advance
You have to look at the implementation of UserDetailsService and replace how the user is being loaded. For example, change the below line to load user by mobile number.
Optional<User> userFromDatabase = userRepository.findOneWithAuthoritiesByLogin(lowercaseLogin);
You could also save the mobile number in existing login field. Then you do not need to change anything.

AdMediator - UWP - What's What

Using the AdMediator control could not be any more confusing. (Universal App)
Set one of keys, app ids etc.
Microsoft help starts with adding a connected service which adds a .config file. with keys, ids and who knows what else to the project.
Set two of keys, app ids etc.
Dev Center Dashboard add ad unit (Required Step) - another set.
Set three of keys, app ids etc.
By dragging the control to the designer!
Now I have 3 possible different keys
Do I need an ad unit for each control I add? (possible 4 sets now)
Do I really need a Mobile version? (choice when adding an ad unit, how about 5)
Do I really need an AdDuplex control ? (if AdDuplex is chosen in connected services - now it's getting crazy)
After all is said and done - does the project .config file need to be manually edited?
Can someone give me the run down on how to say, add 2 controls to a Universal App( one per page) ?
You need 1 application id for each of ad provider.
You need at least 1 ad id for each of ad provider.
If you only use MS ad (formerly PubCenter), you need to use the set of ids from Dev Center only. Remove AdDuplex if you are not need it (its optional).
Do I really need a Mobile version?
No. Its optional.
does the project .config file need to be manually edited?
No, but if you want to change it, you can do it even after submiting, from dashboard in Dev Center.

Silverlight XAP is getting shared across 2 session in the same machine

I have a problem on my silverlight application.
I login in my application using my ID (assume x) (using Internet explore 8),
so assume i can see some reports which is releated to my ID.
Without closing the above browser in another Internet explore 8 in the same machine i am login into the
same application using another ID(assume y), so now i can see 2nd set of reports which is related to this ID.
Now If i refresh the report page of the first browser which is got logged with the ID (x), I am seeing the (y)
userid's report not the earlier.
How to fix this?
Thanks
In internet explorer choose "New Session" from the "File" menu. This will create a new IExplore.exe process tree which manages its own set of session level cookies. This should allow you to maintain two separate logins at the same time.
Sounds like you are using the ASP membership provider... if so that is limited to 1 session per browser/user on the same PC (same limitation if it was a web app).
Why are you trying to login 2 different users from the same machine? If it is for testing you can probably open two different browsers (IE and FireFox?) and get two session that way.
Update (based on comments below):
Option A. As you need multiple user logins on the same machine in the same browser type, you cannot use the asp membership provider and will have to replace that provider with a Silverlight-specific credential/login system.
Option B. The alternative is to change your application to allow selection of client from within the app (this would be my choice as you are misusing users as a convenience).

Resources