Posts

Date Format Types in android

All Possible Format for Date Converter :- final String[] possibleFormats = { "EEE, dd MMM yyyy HH:mm:ss z", // RFC_822 "EEE, dd MMM yyyy HH:mm zzzz", "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss.SSSzzzz", // Blogger Atom feed has millisecs also "yyyy-MM-dd'T'HH:mm:sszzzz", "yyyy-MM-dd'T'HH:mm:ss z", "yyyy-MM-dd'T'HH:mm:ssz", // ISO_8601 "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-dd'T'HHmmss.SSSz", "yyyy-MM-dd" }; Function how to change :- String inputPattern = "yyyy-MM-dd'T'HH:mm:ssZ"; String outputPattern = "dd-MM-yyyy HH:mm:ss"; SimpleDateFormat inputFormat = new SimpleDateFormat(inputPattern); SimpleDateFormat outputFormat = new SimpleDateFormat(outputPattern); Date date = null; String str = null; try { date = inputFormat.parse(orderDate); orderDate = outputFormat.format(date);

How to change searchview property to change searchview design

For SearchView : - android:textColorSecondary applies to the close icon android:textColorPrimary applies to the text you enter colorControlActivated applies to the cursor android:textColorHint applies to the hint text  <!-- Background for the search query section (e.g. EditText) -->     <item name="queryBackground">...</item>     <!-- Background for the actions section (e.g. voice, submit) -->     <item name="submitBackground">...</item>     <!-- Close button icon -->     <item name="closeIcon">...</item>     <!-- Search button icon -->     <item name="searchIcon">...</item>     <!-- Go/commit button icon -->     <item name="goIcon">...</item>     <!-- Voice search button icon -->     <item name="voiceIcon">...</item>     <!-- Commit icon shown in the query suggestion row -->     <item na

Change Alias name in jks file in android

change Alias Name :- keytool -changealias -alias "oldaliasname" -destalias "newaliasname" -keypass (password) -keystore filename.jks -storepass (password) show keystore details :- keytool -list -v -keystore filename.jks

How to upload image in php ?

<?php header('Content-Type: application/json'); include '../connection.php'; $target_dir = "../upload/profile/"; $userId = $_POST['userId']; $target_file = $target_dir . basename($_FILES["profile_photo"]["name"]); $message=""; $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); // Check if image file is a actual image or fake image $check = getimagesize($_FILES["profile_photo"]["tmp_name"]); if($check !== false) {         // echo "File is an image - " . $check["mime"] . "."; $uploadOk = 1; } else { $message =  "File is not an image."; $uploadOk = 0; } // Check if file already exists if (file_exists($target_file)) { $message = "Sorry, file already exists."; $uploadOk = 0; } // Check file size if ($_FILES["profile_photo"]["size"] > 500000) { $message = "

How to Upload CSV file in phpMyAdmin of cPanel ?

How to upload CSV file in PHP, my admin? steps : - 1) open excel file. 2) save as UnicodeText(.txt) format 3) open .txt file and change delimiter (     )tab to any you want. ->we use ||. Like, pipe(||),comma(,,),etc. "Note which delimiter you apply that can't be the value of the any field." 4) the first column is a name of the columns 5)in server phpmyadmin open import tab. File to import: 6)browse that .csv file -> Character set of the file:utf-16 ->Skip this number of queries (for SQL) starting from the first one:1(if u have first columns as a field name) otherwise 0. Format: 7) CSV ->select if u want to update same data ->Columns separated with: value which u set as delemeter.(in our case ||) ->Columns enclosed with:" ->Columns escaped with:" ->Lines terminated with:auto Column names: id,sub_category_name,sub_category_details,catId,typeId(our field names)

what thing is required to upload app on play store ?

1)Need Play Console Account : - 2)App Name 3)Short Description , Long Description 4)App Logo 512 x 512 5)App Banner 1024 w x 500 h 6)App Screen Shots 6-8 7)App Category 8)Website(optional) 9)Privacy Policy(optional)(Url) 10)Apk. 11)App contain any purchase(means app ma koi item purchase nu 6?).

How to send firebase push notification

POST-URL : - https://fcm.googleapis.com/fcm/send header : - Content-Type: application/json Authorization:key= AIzaSy*************************3SY(Server key from Google Play Console ) //Send To Single Device : - body : - {   "data": {     "image": "https://lh3.googleusercontent.com/-joANfM24rjU/AAAAAAAAAAI/AAAAAAAAACI/wTOiaSlKeDw/s60-p-rw-no-il/photo.jpg",     "message": "Hello,Push Notification",     "AnotherActivity": "True"   },   "to": "dKq******kM:APA91bFU9Y-NCKguMBOv_qvrAv***************************************************************SLmUwNl1yCRwTrQsRVPNAhh7O3UpzgWKQnKI9GIcDRnUM8X" } //Send To All Devices : - In Android Studio :- FirebaseMessaging.getInstance().subscribeToTopic("all"); body :- { "data": {     "image": "https://lh3.googleusercontent.com/-joANfM24rjU/AAAAAAAAAAI/AAAAAAAAACI/wTOiaSlKeDw/s60-p-rw-no-il/photo.jpg",