How to query “findCurrentPlace” in Google’s new Places SDK client? I want to add custom radius and type for search nearby places

I’m using Google’s new Places SDK client. I want to show places for x radius and type = CAFE, BANK etc. Is there any way to achieve this? val placesClient = Places.createClient(this) val placeFields = arrayListOf( Place.Field.NAME, Place.Field.LAT_LNG ) val request = FindCurrentPlaceRequest.builder(placeFields).build() placesClient.findCurrentPlace(request).addOnSuccessListener { placeResponse -> placeResponse.placeLikelihoods.forEach { Log.i(“Places”, String.format(“Place ‘%s’ has likelihood: %s”, … Continue reading “How to query “findCurrentPlace” in Google’s new Places SDK client? I want to add custom radius and type for search nearby places”

Centering an image inside a div with an aspect ratio background image

I have a div with a background image that is always supposed to have the same aspect ratio no matter the screen resolution. I set this with: padding-top: 50%; Now, inside that div I am trying to center (equal top and bottom, left and right) an image, also no matter what the resolution. I achieve … Continue reading “Centering an image inside a div with an aspect ratio background image”

5.1 Crash – A TaskDescription’s primary color should be opaque

I have implemented material design into my app and it runs perfectly fine on < Android 5 but when I try to run on Android 5.0 and above I get the following in my logcat. FATAL EXCEPTION main Process com.test.test, PID 3195 java.lang.RuntimeException Unable to start activity ComponentInfo{com.test.test/com.test.test.MainActivity} java.lang.RuntimeException A TaskDescription’s primary color should be … Continue reading “5.1 Crash – A TaskDescription’s primary color should be opaque”

In viewpager how to show only one fragment in full screen?

I have a viewpager with exoplayer in each fragment. UI shows the selected fragment in 80% of the UI and 20% of the UI is taken by next fragment. I want next fragment to be hidden and only show one fragment in full screen. For more info please click herehttps://stackoverflow.com/q/55321620

How to convert uint8 Array to base64 Encoded String?

I got a webSocket comunication, I recieve base64 encoded string, convert it to uint8 and work on it, but now I need to send back, I got the uint8 array, and need to convert it to base64 string, so I can send it. How can I make this convertion? For more info please click herehttps://stackoverflow.com/q/12710001

Remove tab bar item text, show only image

Simple question, how can I remove the tab bar item text and show only the image? I want the bar items to like in the instagram app: In the inspector in xcode 6 I remove the title and choose a @2x (50px) and a @3x (75px) image. However the image does not use the free … Continue reading “Remove tab bar item text, show only image”

Native ionic 2 geolocation is not working on android device

I am using the native Ionic 2 Geolocation plugin and it does not work as expected. First, I add the plugin. ionic plugin add cordova-plugin-geolocation I then import the plugin and issue a call to get the current position. import { Geolocation } from ‘ionic-native’; import { Geoposition, GeolocationOptions } from ‘ionic-native/dist/plugins/geolocation’; export class MyComponent … Continue reading “Native ionic 2 geolocation is not working on android device”

Return data from function to ajax javascript

I wanted to make a button when i clicked it called that ajax function to send data to a function then the function returns the data back to the ajax so that it can execute the success call which makes the button become disabled. Here’s the function notify() public function notify() { $id = $this->user[‘id’]; … Continue reading “Return data from function to ajax javascript”

How pass function with ref on a class to another class without using props? is it possible? (ReactNative)

For example , I have 2 classes named A and B. and then I instantiate ScrollView component on class A then access reference of it using ref attribute. what I want to do is to call this.ref inside Class B. I just want to control scrollTo method inside class B. my desired output is . … Continue reading “How pass function with ref on a class to another class without using props? is it possible? (ReactNative)”

Insert query is not working “Query was empty” I need to insert the data that is displayed on the table Thanks in advance

if(isset($_POST[‘insert’])) { $index=1; while($index <= $count) ##inserting the values in db { $loan = $_POST[“loan_amount$index”]; $interest1 = $_POST[“int1$index”]; $interest2 = $_POST[“int2$index”]; $interest3 = $_POST[“int3$index”]; $interest4 = $_POST[“int4$index”]; $interest5 = $_POST[“int5$index”]; $interest6 = $_POST[“int6$index”]; $interest7 = $_POST[“int7$index”]; $interest8 = $_POST[“int8$index”]; $interest9 = $_POST[“int9$index”]; $interest10 = $_POST[“int10$index”]; $forOdNextMonth = $_POST[“due1$index”]; $forOdNextMonth1 = $_POST[“due2$index”]; $forOdNextMonth2 = $_POST[“due3$index”]; $forOdNextMonth3 … Continue reading “Insert query is not working “Query was empty” I need to insert the data that is displayed on the table Thanks in advance”

Have a question or need a custom quote?
info@smartinfocare.com