Giter Site home page Giter Site logo

jahidul007 / android-with-java Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.54 MB

Doing some Android Development before adding in real life project

License: Apache License 2.0

Java 97.01% JavaScript 0.60% HTML 2.00% CSS 0.38%
android java firebase sharedpreferences dagger retrofit json gson broadcast-reciever javascript

android-with-java's Introduction

Android-With-JAVA

What is Android?
who_i_am
Android is an open source and Linux-based Operating System for mobile devices such as smartphones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies......

Why Android?
why_android

Retrofit
Retrofit is a type-safe REST client for Android, Java and Kotlin developed by Square. The library provides a powerful framework for authenticating and interacting with APIs and sending network requests with OkHttp. See this guide to understand how OkHttp works.

Broadcast Receiver
A broadcast receiver (receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.
The following example demonstrates the registration for the BOOT_COMPLETED event in the Android manifest file.

            <action android:name="android.intent.action.BOOT_COMPLETED"/>
            <action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>

ProGruad to prevent Reverse Engineering

buildTypes {
    debug {
        shrinkResources true
        minifyEnabled true
        useProguard true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

    release {
        shrinkResources true
        minifyEnabled true
        useProguard true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

Can multiple android application access same firebase database?

  1. Yes, it is possible. Go to your firebase console. Select home tab. Click on Add App. Select Add firebase to your Android App. Provide the necessary details for the package name. Download the latest config file and add it to all the android apps connected to this firebase project.

  2. With Android Studio 2.2 and upwards you can easily create and add apps to you Firebase project without leaving your work environment and no need to download google-services.json

From Android Studio go to Tools->Firebase and create, add apps to project of choice :)
kbqcc

Build unsigned APK file with Android Studio
I would recommend you to build your apk file with gradle:

  1. Click the dropdown menu in the toolbar at the top
  2. Select "Edit Configurations"
  3. Click the "+"
  4. Select "Gradle"
  5. Choose your module as Gradle project
  6. In Tasks: enter assemble
  7. Press Run
    Your unsigned apk is now located in
    ProjectName\app\build\outputs\apk

WebView is not loading page in Android 9.0?

  1. Add @xml/network_security_config into your resources:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">www.google.com</domain>
    </domain-config>
</network-security-config>
  1. Add this security config to your Manifest like this:
<application
    ...
    android:networkSecurityConfig="@xml/network_security_config"
    ...>

    ...
</application>
  1. Now you allowed using HTTP connection on www.google.com subdomains.

How can I open a URL in Android's web browser from my application?

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);

As for the missing "http://" I'd just do something like this:

if (!url.startsWith("http://") && !url.startsWith("https://"))
   url = "http://" + url;

Android webview displaying blank page :

wbView.getSettings().setDomStorageEnabled(true);

Picasso Image:

Picasso.with(context).load(product.getImage()).into(holder.imageView);

android-with-java's People

Contributors

jahidul007 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.