User Login

Please enter user name and password into following boxes!

If you are not registered yet, please click

Forget Password

If you forget your password, please click

android

  • Android Correct Usage Onesignal

    When using onesignal as notification system in Android application, we should insert following codes in ApplicationManifest.xml file: <meta-data android:name="com.onesignal.NotificationOpened.DEFAULT" android:value="DISABLE" /> After adding this meta-data, Android will disable launcher activity to be opened. Handle notification opened event as follows: public class App extends Application { protected boolean active = true; protected int splashTime = 3000; @Override public void onCreate() { s...Continue Reading

    How to Upload Files In Android

    You can use following codes to upload files with extra parameters in Android app: public String uploadFile(String uri, String fileName) throws Exception { String lineEnd = "\r\n"; String twoHyphens = "--"; String boundary = "*****"; int bytesRead, bytesAvailable, bufferSize; byte[] buffer; int maxBufferSize = 1 * 1024 * 1024; FileInputStream fileInputStream = context.openFileInput(fileName); URL url = new URL(uri); // Open a HTTP connection to the URL HttpURLConnection conn = (HttpURLConnection) url.openC...Continue Reading

    How to Create EditText with Cross Icon in Android

    To make EditText with clear icon to delete what is written into it, we can use following codes: act_layout_search.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="5dp" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <EditText...Continue Reading

    Sample Proguard Config File For Android Application

    Sample Proguard config file defined in an Android project as follows: # This is a configuration file for ProGuard. # http://proguard.sourceforge.net/index.html#manual/usage.html -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -verbose # Optimization is turned off by default. Dex does not like code run # through the ProGuard optimize and preverify steps (and performs some # of these optimizations on its own). -dontoptimize -dontpreverify # Note that if you want to enable optimization, you cannot just # include optimization flags in your...Continue Reading

    JSoup And Proguard

    When you use Jsoup library in a Java project or Android project and compile the project with proguard, then we can face nullpointerexception. To solve this problem, we sould exclude jsoup library from Proguard config file as follows: -keep public class org.jsoup.** { public *; }...Devamını Oku

    Android How Much Of The Extra Space In The Layout To Be Allocated To The View

    LinearLayout supports assigning a weight to individual children. This attribute assigns an importance value to a view, and allows it to expand to fill any remaining space in the parent view. Default weight is zero Calculation to assign any remaining space between child space assign to child = (child individual weight) / (sum of weight of every child in Linear Layout) Example (1): if there are three text boxes and two of them declare a weight of 1 , while the third one is given no weight (0) , then remaining space assign to 1st text box = 1......Continue Reading

    Android Solution Of AdMob Not Showing In WebView

    While developing android application with AdMob and WebView, you can face with a big problem. This problem is that AdMob may not be seen in the screen because WebView encapsulates all screen. To overcome this problem, you should use a layout which looks like the following layout......Continue Reading

    Android Create Signed And Zipaligned APK File

    To create signed and zipaligned apk file with Maven, the necessary configurations are: 1. Firstly, you have to create a .keystore file... myCertificate is the name of your .keystore file; and myKey is your alies. You can change these names.....Continue Reading