Categories
Android Development

Sharing data between two android applications using content provider

I wanted to implement two application one to store the data and the other to retrive the data using content provider,can any one help me in creating this.I searched the internet but i did not find the solution to create it.

Categories
Android Development iOS

How can i regenerate ios and android folder?

How can I regenerate ios and android folder in React Native project? react-native-cli: 2.0.1 react-native: 0.61.2 ❯ react-native eject error Unrecognized command “eject”. info Run “react-native –help” to see a list of all available commands. ❯ react-native upgrade –legacy true error: unknown option `–legacy’

Categories
Android Development

Align MpAndroidChart Bar graph on bottom without XAxis

I am using bar graph from MpAndroidCahrt on android app. The problem is bars on graph doesn’t align on the bottom. It has a slight padding between bars and bottom side. I’m not using XAxis and YAxis either. Is there are some solutions? Below is my code. chart.data = barData chart.barData.barWidth = 0.5f chart.setFitBars(true) chart.setDrawGridBackground(false) […]

Categories
Android Development

i cant post com.android.volley.ServerError

i try only post to my php script with this code but i have Server Errorlike so private static final String URL1 = “https://exp.com/appLoc.php”; private void User_Enter(){ StringRequest strRequest1 = new StringRequest(Request.Method.POST, URL1, new Response.Listener<String>(){ @Override public void onResponse(String response){ } }, new Response.ErrorListener(){ @Override public void onErrorResponse(VolleyError error){ Toast.makeText(getApplicationContext(), error.toString(), Toast.LENGTH_SHORT).show(); } }) { […]

Categories
Android Development

How to render OpenGL in Flutter for Android?

if (call.method.equals(“createVideoRenderer”)) { TextureRegistry.SurfaceTextureEntry entry = textures.createSurfaceTexture(); SurfaceTexture surfaceTexture = entry.surfaceTexture(); this.surfaceTexture = surfaceTexture; This is my java method call that creates my SurfaceTexture and saves it into my class instance. I’ve been reading about SurfaceTexture’s class and this is how I understand it: I need to call surfaceTexture.setOnFrameAvailableListener(SurfaceTexture.OnFrameAvailableListener listener) to pass an instance of […]

Categories
Android Development Java

Exception while testing LiveData java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked

I’m attempting to test class functionality which extends a ViewModel, with JUnit5 and Mockito and getting an exception java.lang.RuntimeException: Method getMainLooper in android.os.Looper not mocked. I have annotated the test class with @ExtendWith(InstantExecutorExtension.class) since I’m testing LiveData and the values need to be directly updated on the calling thread which can be done using an […]

Categories
Android Development XML

Background image set for RecyclerView in XML doesn’t show in Android

I’m using RecyclerView and I’m trying to set a background image for the RecyclerView in XML, using android:background=”@drawable/soccer_field” but for some reason, it doesn’t show. I’ve tried to set a background image for the entire layout(of the all screen), and what I’ve found out is that the RecyclerView “hides” the background image, so that only […]

Categories
Android Development iOS React

Release build crashing after a successful build in android and iOS after changing appName for a react native project

Android release build crashing after changing app_name(strings.xml). App is building and running successfully in DEBUG variant but failing with the below error in release varian both through CLI(react-native run-android –variant release –deviceId XYZZ) and through android-studio. PFA screenshot for logcat logs. Steps taken to resolve: Clear gradle cache. Remove node modules, yarn lock and reinstall […]

Categories
Android Development

How to resize image after MediaStore.Images.Media selected image on Android

I currently successfully uploaded an image inside my mobile app to the server. I am trying to figure out how to resize the image and potentially created a thumbnail before I send this to the server. I have tried many methods I found online but none work. Below is my code so far. filePath = […]

Categories
Android Development

Volley POST request Android token

I am new to new android programming and currently working with the Volley POST request library for a login page. I already have a working API which gives a String token when you make a post request. For now I have hard coded the username and password just to see if the post request works […]