The Android architecture has the Main Thread AKA UI thread, which updates the UI after every 16ms frame.
Tuesday, March 1, 2022
PlayStore Background Location Approval
Google approve your app once the permission declaration form is signed and submitted to the play store Here you will need to answer the following questions.
1.Permission Declaration Form
You can find the permission decalrion form via app content in playstore dashboard .
Once you get there you will need to answer following questions
1- what is the core purpose of your app?
2- Why does your app need to aceess location in the background?
3- Here you need to describe the main Feature that requires background location access if you have more than one feature choose one that provides the most value to the user
4- Describe the detail why background location access is needed instead of foreground
5- Video Submission
It can be an Inn App Disclosure that states why we use background location and has onclick method to enable location rightaway
Example Text For Disclosure
This app uses location feature for building an accurate daily journey
and uses other feature of geospark like trips insights geofences and events
.\Please enable the location Permission
Monday, January 17, 2022
Handlers and Threads In Android Studio
When a user opens an application android operating system creates a process or a thread of execution of commands called the main Thread or the ui thread . The main thread is nothing but handler thread .The main thread is responsible for handling events from all over the apps . Any piece of java code is that needs to be exwcuted are pushed and serviced by the Main Thread .The main is thread is doing most of the stuff so its better to use multiple thread other than the ui thread or main thread.
A thread is the path followed when executing a program .The jvm allows and application to have multiple threads of execution running parralell . So multple path of programs can executed in paraalel .so as to bring the results or returns of methods to the Main Thread
We can perform any task in multiple threads but as far as Updating the userinteface or anything updating the main thread is concerned we cant do it unless we have handlers in that thread that will tell the Main Thread about the updates or data .
A video will be uploaded soon with the attachment
Wednesday, January 12, 2022
Broadcast In Android
Broadcast Are such classes in android by which data can be transferred bwetween several app also some triggers can be developed to execute some functions.
For Example
We can run our own methods when an android phone starts or whenever there is incoming call acutually we can say they are triggers for a code to be executed when a specified intent is alive inside the android operating system
<intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED"> </action> </intent-filter>
the above intent can be declared in MANIFEST File and A broadcast Reciever onRecieve Method is executed whenever this intent is recieved CUSTOM INTENTS IN ANDROID
you can create custombroadcast intent tha twhen on recieve will execute functions
public void broadcastIntent(View view){ Intent intent = new Intent(); intent.setAction("com.tutorialspoint.CUSTOM_INTENT"); sendBroadcast(intent); }
Include above code in your mainactivity on a button click this will send a broadcast intent and can be recieve via create reciever and declaring in manifest
Wednesday, December 8, 2021
How to create csv file in android studio ||csv file in java language via filewriter
package com.mafaz.csvcreatefile;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.os.Environment;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
File folder = new File(Environment.getExternalStorageDirectory()+"/sensordata.csv");
//String location = "/InternalStrorage/newCsvFile.csv";
generateCsvFile(folder.toString());
}
private static void generateCsvFile(String fileName) {
FileWriter writer = null;
try {
writer = new FileWriter(fileName);
writer.append("Name");
writer.append(',');
writer.append("Number");
writer.append('\n');
writer.append("interview questions");
writer.append(',');
writer.append("001");
writer.append('\n');
writer.append("interview programs");
writer.append(',');
writer.append("004");
writer.append('\n');
System.out.println("CSV file is created...");
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
writer.flush();
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
Friday, December 3, 2021
How to Create Background Services in Android Studio
Services in Android
FOREGROUND : Runs even if app is killed displays notification while running
BACKGROUND : Run like foreground without notification
BOUND : Bounded to component . alive till component is alive\
Github: https://github.com/OwaisBukhari/BackgroundServices
Youtube: https://youtu.be/D0QxMBjcfl0
Monday, November 15, 2021
Fetch Folder name in php
<?php
Fetch Json Data in JAVASCRIPT
<script>
Friday, November 12, 2021
Google Sheets Create Json Api
function doGet(e) {var sheet = SpreadsheetApp.getActive();var nse = sheet.getSheetByName("NSEE");var data =[];var rlen=nse.getLastRow();var clen=nse.getLastColumn();var rows = nse.getRange(1,1,rlen,clen).getValues();for(var i=1;i<rows.length;i++ ){var datarow= rows[i];var record ={};for (var j=0;j<clen;j++){record[rows[0][j]] = datarow[j];}data.push(record);}console.log(data);var result = JSON.stringify(data);return ContentService.createTextOutput(result).setMimeType(ContentService.MimeType.JSON);}
Tuesday, July 20, 2021
Fused locations api in android studio
Friday, July 16, 2021
Python apps and native Android programming
✅✅✅ Hope you find it to be useful Feel free to ask anything
Wednesday, July 14, 2021
Android Play Store Earning Potential
If wanna make some money from playstore you can place some ads google ads of various orientation right from the start you dont need to have particular installs for doing this . Thats the most amazing thing with playstore publishing .
Thursday, July 8, 2021
Career opportunities in Android Development
MULTIPLE OPPOTUNITIES ARE AVAILABLE FOR THE ANDROID DEVELOPER
SOURCES OF INCOME :
There are more than 4 income and money-making ways in android development
Freelancing
Job
Teaching as a programmer
youtube channel
blog writing
contributing for the global community
publish app to playstore
Best Of Luck
Monday, July 5, 2021
Using Google Sheets to Update Calendars
Thursday, July 1, 2021
Monday, June 21, 2021
Wednesday, March 31, 2021
callbacks in android
suppose b(return of a ) and a is a function . B function takes argument of A(FUNCTION POINTER ),
Tuesday, March 30, 2021
Broadcasts in android
Broadcasts listens to any type of event like touch or walk or sms recieve and then do something on recieving the broadcast .via OnRecieve method . LIKE FOR EXAMPLE
If we want to do something when an sms is recieved in mobile then first declaring broadcast and intentfilter inside the manifest then creating a class extending broadcastReciever . we can do what we want in OnResponse method.
Monday, March 15, 2021
JsonObject==null condition doesnt work and Formater doesnt format the null jsonobject like this {};
solution is
using .isnull method for the if condition and
excecuting the formating only when not null condition and it Works yoo!!
Saturday, March 13, 2021
KeyPoints-Series-1
The Android architecture has the Main Thread AKA UI thread, which updates the UI after every 16ms frame.
-
When a user opens an application android operating system creates a process or a thread of execution of commands called the main Thread or ...
-
package com.mafaz.csvcreatefile ; import androidx.appcompat.app.AppCompatActivity ; import android.os.Bundle ; import android.os.Environme...