How to get user input in scene based application using samsung smart tv - samsung-smart-tv

Am new to develop app in samsung smart tv in normal application i use IME and got output and my problem is by using scene based application how i will get user input and make process it ? and Second one i am using samsung smart tv sdk4.5 in that i try add js file in scene.js file but $.sf.loadJS is not working it shows.."Error Detail: Uncaught TypeError: Cannot call method 'loadJS' of undefined" , like this plzee tell me solution for this without this solution i cannot look forward.thanks in advance

I don't know your code looks like, but usually the code for native object from SDK is non-compatible between scene-based and normal project (actually the library loaded from those 2 template kind like different)
Scene-based library usually all wrapped in "sf" object. Please look at the links below
http://samsungdforum.com/Guide/ref00009/uiapi_textinput_textinput.html
http://samsungdforum.com/Guide/ref00009/uiapi_textinput_sftextinput.html

Related

Compare two pictures with each other with Ionic

Is it possible to compare two images with Ionic?
The scenario would be this: I have a database with 50 different images of different flowers and corresponding metadata like title and description. If I now take a picture of a flower with my smartphone, can I assign this picture to another one to find the most suitable result?
Do I need services like the Google Cloud Vision API to do this? Or can I do it internally because I already have the database?
PS: If a server is required, Cloud Functions would be a possibility. For example, programming in Python would be possible there.
No Ionic cannot do this.
Ionic is just a UI framework that allows you to build cross-platform apps and specifically mobile apps (iOS, Android, [formerly] WindowsMobile).
What you're trying to do is something that another system could do. Check out OpenCV,
which would be more suitable for your purposes, and then you can use Ionic to build a nice interface around it.

Is it possible to activate ionic app on call

I am not sure it is possible in ionic or not. What i want to do is create an app that can record user calls. so app must be activate when user make or get a call.
can anyone tell me if it is possible, how to do this?
Beware this won't be an easy task but "never give up, never surrender". You'll want to use a variation of techniques first off this isn't an Ionic thing as much as it is a PhoneGap thing - ionic runs on phonegap.
Your workflow will look something like this:
User opens your app sees a list of contacts
(the formatted names of contacts are different for android & ios so be prepared to test for this.
http://ngcordova.com/docs/plugins/contacts/)
Contacts are displayed in ion-list user select one and phone's dialer launches (use href=tel:xxxxx)
From there you're going to want to trigger the audio capture plugin's API
https://github.com/apache/cordova-plugin-media-capture
To add the plugin to your project:
cordova plugin add cordova-plugin-media-capture
While it doesn't directly say it can record in call conversations it should still work.
It can definitely be done the storage space is also of concern, you'll have to set something in place to tell the user how many seconds/minutes they have the capacity to store.
That should get you started there will certainly be unforeseen nuances.
Good luck.
We can record calls with cordova-media-plugin plugin in android.
First install the media Plugin by executing the following command
cordova plugin add cordova-plugin-media
Then goto the Plugin folder and traverse into the following file “plugins\cordova-plugin-media\src\android\AudioPlayer.java” . Here in the startRecording function we have line
this.recorder.setAudioSource(MediaRecorder.AudioSource.MIC); line number is 154
Change it to this.recorder.setAudioSource(MediaRecorder.AudioSource.VOICE_CALL);
We can replace MIC with any audio source in the following link. for example VOICE_COMMUNICATION,VOICE_DOWNLINK,VOICE_RECOGNITION etc
https://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html

Trigger.io: forge.file.getImage() causes an application crash when accessing Android's Photo Library

We have a serious problem in our application. Before, when we get an Image using camera or via Photo Library, our application crashed and restarts and become a blocker in our development.
W Forge : Unhandled intent result, should have been handled by Forge.
We tried the solution here: Trigger.io: : Unhandled intent result
And luckily, it won't crash now if we will use the camera. But the problem still exists when the user chooses Gallery.
Do we have any alternative way how to handle this kind of situation?
Waiting for any responses, thanks!!!
Not really at the moment - the device is running low on memory and your app is being killed when the gallery starts up.
One option would be to use a plugin / module like this, which presents the image-picking interface inside your app.
That plugin I linked to, however, is pretty old and made for Trigger.io version 1.4: it will take a bit of work to convert to a module.

Can I programmatically access a smartphone's sensors through the browser and JavaScript?

Is it possible for me to programmatically access a smartphone's sensors (e.g. accelerometer, compass, etc. on an Android or iPhone device) through a browser webpage and JavaScript? I know that the W3C Devices standard can allow access to the camera.
HTML5 is likely to contain a sensor API. Until this is fully standardized, vendors provide their own APIs such as Apple does for mobile Safari.
There's no need for full blown solutions like PhoneGap or similar if it is Ok for you to restrict yourself to a specific vendor/device. If not, frameworks like PhoneGap provide you with a unified, device independent API.
You should be aware of the Performance constraints that apply to Javascript applications running inside the browser of a mobile device. Depending on your type of application and the amount of processing you intend to do on the sensor data, you are better off writing a native application
See https://developer.apple.com/library/safari/iPad/#documentation/SafariDOMAdditions/Reference/DeviceMotionEventClassRef/DeviceMotionEvent/DeviceMotionEvent.html for some reference documentation.
The answer is both "yes" and "no". Each phone manufacturer/OS combination behaves as it sees fit here - for example, the GPS on an iPhone can be accessed, but the compass not:
accessing iPhone compass with JavaScript
You can use something like PhoneGap to do this, I believe.
Check out this chapter called "Controlling the iPhone with JavaScript" from the book Building iPhone Apps with HTML, CSS, and JavaScript
This demo considers the iPhone movements on the three axis using the event.accelerationIncludingGravity object:
http://www.omiod.com/iphone/acceleration-demo.php
So far Safari on iPhone is the first to implement it, but I see Android filling this gap very soon.

What's the best way to do a mapping application for the iPhone

So I'm looking at writing an iPhone application that shows things on a map. What frameworks/methodologies are out there for doing this?
Searching around on Google, I could only find this one:
http://code.google.com/p/iphone-google-maps-component/
Which according to the issues list is slow, and stops working after a while. Does anyone know of something better, or have any experience with the library above?
I'm pretty sure your only options for now are:
Call openURL: to switch to the Maps app
Use the Google Maps component you linked to
Roll your own thing
Wait for Apple to expose a "MapKit" framework
WARNING: Embedding Google Maps inside an application may violate the Google Maps terms of service.
I have written a full mapping UIView on the iPhone (the application is on the AppStore) and it is not easy (this would be option #3 "Roll your own thing"). Getting good performance is really difficult. I would like to OpenSource my map component but right now the F-NDA is preventing that.
I have been chasing this for a while now, and here's the best solution I've found out there:
http://code.google.com/p/touchcode/
There is a component in there called TouchMap and it comes with a demo that shows it off. It's tiles are loaded directly from Microsoft Virtual Earth.
Edit: #schwa, I just a look at your profile to find your email address, and then realised that you actually released this software. Nice work
I've just found route-me which looks like a large(30+) active community of ppl developing an open source mapping app for the iPhone. It can take tiles from OpenStreetMap, Virtual Earth(Bing) or Cloudmade.
just use mapkit framework.really good
alternatively: [[uiapplication sharedapplication]openurl:#"www.maps.google.com];
that will open the google map,but one problem with this is that it will navigate you to safari and your application will be exited and if you want to move back to your application from this web page,then it won't be possible .you again need to run the app.