pages

Sunday, October 24, 2021

Wedding in Turkey

Getting Maried In Turkey

     In Turkey, you must be married in a legal civil ceremony. Many couple choose to have a religious ceromony a few days before the legal ceromony ,where they invite family and friends to a service and then reception - much like western style. The build up to a Turkish wedding is just as important as the celebration, however. Three nights before the wedding, the women gather together for the henna evening.By the way , In Turkey the months of August and September have always been the most popular time for weddings.

What Do Parents Think Of Their Children's Wedding?

           I'd like to say "NOTHING!" but contrary to it , A lot of things are thought by the groom's and bride's families so that in general too much oppositions happen between the families. Because every family wants their own welfare without thought. Sure , there is exception for each situation. The real thing is that weddings in turkey makes every wedding family exhausted after the wedding celebration.




The Impression Of Islam Over The Wedding in Turkey

           Although the majority of the population of Turkey are Muslim, the country has a long-standing tradition of secularism in many different practices. The bond of marriage is considered one of the most sacred religious customs of Islam and most religion, however, and so the joining of a man and wife still follow some of the customary Muslim procedures. There are important parts of the Turkish Muslim procedure which differ from other Muslim countries, however. 

        To be honest , I've written this essay with plagiarism. 20 percent of this essay is mine , the rest belongs to other guys who don't matter who are. 




Monday, October 18, 2021

Mavlid An-nabi the birth of Prophet Mohammad #17th October 2021

       As-salamu aleykum.. Yesterday was an significant day for every muslim because our prophet Mohammad was born on this date many years ago (on the twelfth day of the month Rabial-awwal). There are many celebrations, festivals, prayer services on these days because this week every year is celebrated as the Mavlid an-nabi week. 


Mawlid, is the observance of the birthday of the Islamic prophet Muhammad which is commemorated in Rabi' al-awwal, the third month in the Islamic calendar. 12th Rabi' al-awwal is the accepted date among most of the Sunni and Shia scholars, while few Shia scholars regard 17th Rabi' al-awwal as the accepted date.



Sunday, October 3, 2021

Edit A Poem Using The Dart Language

You alright ? I think you all are fine. Okay , I've specified the topic as an handy activity. And Here it is. What you need to execute with me  are 1- vscode text editor , 2- internet to fallow my instructions :) Okey let's begin.

I chose the poem known Canım İstanbul written by Necip Fazıl Kısakürek the poem master.

Canim Istanbul

Ruhumu eritip de kalıpta dondurmuşlar;
Onu İstanbul diye toprağa kondurmuşlar.
İçimde tüten bir şey; hava, renk, eda, iklim;
O benim, zaman, mekan aşıp geçmiş sevgilim.
Çiçeği altın yaldız, suyu telli pulludur;
Ay ve güneş ezelden iki İstanbulludur.
Denizle toprak, yalnız onda ermiş visale,
Ve kavuşmuş rüyalar, onda, onda misale.

İstanbul benim canım;

# istanbul

## istanbul

--> Okey open your project on vscode in dart.










Sunday, September 19, 2021

Android Development - Inheritance and Classes

    Guys welcome back , you already know that I develop mobile apps and use the kotlin programming language in calloboration with the other 2 languages 'JAVA' , 'DART' with flutter. And today I'm gonna be talking about a confusing topic called Inheritance and classes in an object orriented programming language. 

    I've been focusing on getting the google mobile development certicate for the last two weeks and my purpose is to get the certicate and review my old information to make myself wiser in programming. 

    Let's get started...


2. What is a class hierarchy?

   It is natural for humans to classify items that have similar properties and behavior into groups and to even form some type of hierarchy among them. For example , you can have a broad category like automobiles, and within that you can have more specific types like cars and buses. Within Cars or Buses , you can have even more specific types like Ford cars , Bmw cars or Toyota buses or Mitsubishi buses. This can be represented as a hyerarchy because car and bus categories inherit all the properties of Automobile. Similarly Ford  , Bmw , Toyota , Mitsubishi all seperately  have the properties of car and bus plus their own unique properties.


     While you can write Kotlin code without using classes, Understanding class hierarchies is therefore fundamental to Android app development and allows you to take advantage of features provided by the Android framework. 

For example, there is a View class in Android that represents a rectangular area on the screen and is responsible for drawing and event handling. The TextView class is a subclass of the View class, which means that TextView inherits all the properties and functionality from the View class, plus adds specific logic for displaying text to the user.

2fbc991a6afe5299.png

Taking it a step further, the EditText and Button classes are children of the TextView class. They inherit all the properties and methods of the TextView and View classes, plus add their own specific logic. For example, EditText adds its own functionality of being able to edit text on the screen.

    Instead of having to copy and paste all the logic from the View and TextView classes into the EditText class, the EditText can just subclass the TextView class, which in turn subclasses the View class. Then the code in the EditText class can focus specifically on what makes this UI component different from other views.

On the top of a documentation page for an Android class on the developer.android.com website, you can see the class hierarchy diagram. If you see kotlin.Any at the top of hierarchy, it's because in Kotlin, all classes have a common superclass Any. 

57cd75bd819126bb.png

As you can see, learning to leverage inheritance among classes can make your code easier to write, reuse,

also you can see my homework myself this the the link : My Code




Sunday, September 12, 2021

Android Development - Services 2/4 - Background Tasks Processing


  An app is considered to be running in the background as long as each of the following conditions are satisfied:
  1. None of the app's activities are currently visible to the user.
  2. The app isn't running any foreground services that started while an activity from the app was visible to the user.

Otherwise, the app is considered to be running in the foreground. So we use background tasks at the time when the user cannot notice whether our app is working or not.

~~~~

The second one I want to tell you is what way do we need to follow to reach the right path to make users satisfied. So for that I will give you further principles ,too.

Background tasks fall into one of the following main categories:

  • Immediate 
  • Deferred (delayed)
  • Exact (Certain)

To categorize a task, answer the following questions, and traverse the corresponding decision tree in figure 1:

Does the task need to complete while the user is interacting with the application?
If so, this task should be categorized for immediate execution. If not, proceed to the second question.
Does the task need to run at an exact time?
If you do need to run a task at an exact time, categorize the task as exact.

Most tasks don't need to be run at an exact time. Tasks generally allow for slight variations in when they run that are based on conditions such as network availability and remaining battery. Tasks that don't need to be run at an exact time should be categorized as deferred.

this decision tree helps you decide which category is best for
            your background task



The following sections describe recommended solutions for each background task type.

We recommend Kotlin coroutines for tasks that should end when the user leaves a certain scope or finishes an interaction. Many Android KTX libraries contain ready-to-use coroutine scopes for common app components like ViewModel and common application lifecycles.

For Java programming language users, see Threading on Android for recommended options.

For tasks that should be executed immediately and need continued processing, even if the user puts the application in background or the device restarts, we recommend using WorkManager and its support for long-running tasks.

In specific cases, such as with media playback or active navigation, you might want to use foreground Services directly.

Every task that is not directly connected to a user interaction and can run at any time in the future can be deferred. The recommended solution for deferred tasks is WorkManager.

WorkManager makes it easy to schedule deferrable, asynchronous tasks that are expected to run even if the app exits or the device restarts. See the documentation for WorkManager to learn how to schedule these types of tasks.

A task that needs to be executed at an exact point in time can use AlarmManager.

To learn more about AlarmManager, see Schedule repeating alarms.

Sunday, August 22, 2021

Can Robots Destroy Humanity?

          A person can't create a hyper-realistic humonoid robot just like him or her. Contrary to this , a technology company with it's own computers can make it using 3D modeling. While I'm even writing the essay down which you are reading now , the robots are rapidly kept producing by the company called Promobot. 

       The company has a laboratory for the development of artificial skin,eyes,teeth and the entire outer shell. That sounds good but should people be afraid of the future? or should people expect the future to give great opportunities? Decide to choose one of both. Because we all are shaping our future step by step as people by the decides which we make. So while we are walking on the road which takes us to the future, we should always be so carefull our steps.


Sunday, August 15, 2021

#Android Development : Services 1/4 : The Basics

        #Finally, Jetpack Compose 1.0 was officially incorporated three weeks ago. Upon hearing it , I was so excited about how Jetpack Compose will affect android developers. It has already been with us for a long time actually so we have already known what kind of function it has. But today I'm going to be talking about a different topic I've wondered a lot. 'Services' in programming android apps... 


#Android Services


   Services are one of application components and they can be used as a long-running process executer in the background. A service can keep running until a certain time , even after the user closes the app.


#These are the three different types of services:

1-Foreground

2-Background

3-Bound


//FOREGROUND SERVICE//

   A foreground service performs some operation that is noticeable to the user. So you must declarate it in the manifest.xml also you must create a notification about the the foreground service which is running at the moment. so that users are actively aware that the service is running.Actually it's a must , you have no choices without exception.


Note : Using Work Manager is more reasonable than using directly a foreground service , indeed. But I can't find sufficient source about making services in programming android.


//BACKGROUND SERVICE:

    A background service performs an operation that isn't directly noticed by the user. For example, if an app used a service to compact its storage, that would usually be a background service. "downloading process..etc"


//BOUND SERVICE:

     A service is bound when an application component binds to it by calling bindService().  A bound service runs only as long as another application component is bound to it. Multiple components can bind to the service at once, but when all of them unbind, the service is destroyed. As far as I see it , you have to bind your activities or other components with the bound service to get the results you would like to see.


#A Service or A Thread ,Which one is useful for you?

    First things first , you have to know a service doesn't have a thread or  a separate process area, I mean a service is not the same as a thread at functionallity. We use services to create long-running process steadily for a certain time without letting users notice what's going on in the app. But if a service runs in the main thread with a long-running process , it blocks the users UI especially blocking operations such as dowloading content from a website , maybe it's a video. Here it is!!! Downloading a video from internet blocks users' UI for a long time unless the process runs in a separate thread , to give example , default thread, IO ..etc 

   You should create a service only if that is what you need. If you must perform work outside of your main thread, but only while the user is interacting with your application, Remember that if you do use a service, it still runs in your application's main thread by default, so you should still create a new thread within the service if it performs intensive or blocking operations.


    To create a service, you must create a subclass of Service or use one of its existing subclasses. In your implementation, you must override some callback methods that handle key aspects of the service lifecycle and provide a mechanism that allows the components to bind to the service, if appropriate.


onStartCommand() -> There are several options you have here, this function let you choose one of them and returnes an integer which emphasize how the service behaves when something goes wrong. And I'm gonna mention them later on.

onBind() -> if you don't need it , just get it returned null, but you have to implement it in the every scene.

onCreate() -> You know what this means , indeed :)

onDestroy() -> these are the same as the ones of activities.


  #You must declare all services in your application's manifest file, just as you do for activities and other components.


Note: 

    Users can see what services are running on their device. If they see a service that they don't recognize or trust, they can stop the service. In order to avoid having your service stopped accidentally by users, you need to add the android:description attribute to the <service> element in your app manifest. In the description, provide a short sentence explaining what the service does and what benefits it provides. And if you do it , you will allow users to know what those do in their phones.


    When a service is running, it can notify the user of events using Toast Notifications or Status Bar Notifications. And these may be useful to let users know what are the app doing now. I will learn it and mention it at my next articles.







THE INTEGER CONSTANT VALUES ADJUSTING HOW A SERVICE RUNS:

    # I prefer to use the title actually it might be confusing for you but I think it will clear everything I will mention. 


START_NOT_STICKY
    If the system kills the service after onStartCommand() returns, do not recreate the service unless there are pending intents to deliver. This is the safest option to avoid running your service when not necessary and when your application can simply restart any unfinished jobs.
START_STICKY
    If the system kills the service after onStartCommand() returns, recreate the service and call onStartCommand(), but do not redeliver the last intent. Instead, the system calls onStartCommand() with a null intent unless there are pending intents to start the service. In that case, those intents are delivered. This is suitable for media players (or similar services) that are not executing commands but are running indefinitely and waiting for a job.
START_REDELIVER_INTENT
    If the system kills the service after onStartCommand() returns, recreate the service and call onStartCommand() with the last intent that was delivered to the service. Any pending intents are delivered in turn. This is suitable for services that are actively performing a job that should be immediately resumed, such as downloading a file.

           For more details about these return values, see the linked reference documentation for each constant.