Android

How to change RecyclerView Card’s color dynamically

I have a RecyclerView that displays cards of same size and similar content. Does anyone knows how I would go about changing the cards color depending on the object it holds? So object “A” would have a blue card and object “B” would have a red card. I’ve seen visual design in the web accomplishing this but I was wondering…
Read more

how can i modify package name of decompiled apk?

I have decompiled a voip calling apk file with Apktool and i tried to change itz package name… But i getting error that unfortunately app stopped`… What i did that search the package name inside the all files (root dir)and replace every occurrence with new package name by with notepad ++… Here problem is that app using to communicate their…
Read more

Calculate time thread android

I’m using a thread to set an image as background and in this thread i have a dialog. The dialog starts and should be close when the wallpaper will be set. This is the code so far setWallbtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { final ProgressDialog myPd_ring=ProgressDialog.show(SingleWall.this, “Setting wallpaper”, “”, true); new Handler().postDelayed(new Runnable() { @Override public void…
Read more

Why alpha animation doesn’t work in android?

I want to merge animation in android application. I’m doing with below code. but alpha animation doesn’t work. I don’t have no idea why it doesn’t work. anyone can help me? // create set of animations AnimationSet login_page_animation = new AnimationSet(false); // animations should be applied on the finish line login_page_animation.setFillAfter(true); // create scale animation int white_background_height=((TextView) findViewById(R.id.login_white_backgroud)).getHeight(); TranslateAnimation translate_animation…
Read more

how to get "rtsp" youtube links?

I’m programming an Android app, and I put a stream of video directly from YouTube using an rtsp url. This is the way I used to do it (first answer): RTSP youtube link Recently they have changed their api and whenever I try the method above, it always gives me the same youtube video that says that it’s not competible….
Read more

Android Twitter conversion tracking through MoPub SDK issue

I integrated Twitter conversion tracking through MoPub SDK and also I integrated Fabric SDK through Eclipse. I am facing issue that It not track my App. I added new MoPubConversionTracker().reportAppOpen(this); in My onCreate() method. and also added Api key in Manifest file like this <meta-data android:name=”com.google.android.gms.version” android:value=”@integer/google_play_services_version” /> <meta-data android:name=”io.fabric.ApiKey” android:value=”API-KEY” /> <activity android:name=”com.mopub.mobileads.MoPubActivity” android:configChanges=”keyboardHidden|orientation|screenSize” /> <activity android:name=”com.mopub.mobileads.MraidActivity” android:configChanges=”keyboardHidden|orientation|screenSize” />…
Read more

Posting data to server with jQuery

so I have a basic cordova app created. I added jquery and am trying to make a request to a url. The target is to post data, but I’m testing with a GET method. The problem is that the response is “Failed to load resource: the server responded with a status of 404 (Not Found)”, but when I open the…
Read more

Android : FATAL EXCEPTION: main

I am new in Android Studio. Now am creating tab with swipe. While executing am getting an error like Fatal Execption. Logcat 2497-2497/com.polus.binil.test E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.polus.binil.test, PID: 2497 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.polus.binil.test/com.polus.binil.test.MainActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at…
Read more

Can’t load map in Android Lolipop

Am using google map in my app. I can able to load map with positions except lolipop version mobiles . But in lolipop version map is not loaded Here I taken the log it showing like this 05-14 20:33:35.078: W/System.err(988): java.lang.NullPointerException: Attempt to invoke virtual method ‘com.google.android.gms.maps.GoogleMap com.google.android.gms.maps.MapFragment.getMap()’ on a null object reference MTK_CheckAppName:68: appName=com.appname.android, acAppName=com.android.gallery3d Am getting this type…
Read more