Popular New Releases in Apps
numi
Numi 3.29 for macOS
kalker
refs/heads/master
libqalculate
Qalculate! version 4.0 (library and CLI)
EvalEx
Release 2.6
Ndless
Ndless r2018, fixes crash on CX II-T 5.3.0.564
Popular Libraries in Apps
by microsoft c++
24019 MIT
Windows Calculator: A simple yet powerful calculator that ships with Windows
by MikeMcl javascript
3457 MIT
A small, fast JavaScript library for arbitrary-precision decimal arithmetic.
by nikolaeu javascript
3051 MIT
Beautiful calculator app for macOS
by fossasia javascript
1328 LGPL-3.0
Simple Calculator Web App Using Ember.js
by ahfarmer javascript
985 MIT
Simple calculator built with React
by PaddiM8 rust
946 MIT
Kalker/kalk is a calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals
by Qalculate c++
835 GPL-2.0
Qalculate! library and CLI
by sebastianbergmann php
741 NOASSERTION
Value Object that represents a monetary value (using a currency's smallest unit).
by uklimaschewski java
715 NOASSERTION
EvalEx is a handy expression evaluator for Java, that allows to evaluate simple mathematical and boolean expressions.
Trending New libraries in Apps
by PaddiM8 rust
946 MIT
Kalker/kalk is a calculator with math syntax that supports user-defined variables and functions, complex numbers, and estimation of derivatives and integrals
by gabgoh javascript
184
Epidemic Calculator
by xoofx csharp
163 BSD-2-Clause
kalk is a powerful command line calculator app for developers.
by PaddiM8 rust
137 MIT
A calculator/expression evaluator written in rust that supports variables and functions.
by zxcodes css
57 GPL-3.0
A Calculator App built with HTML, CSS, and JavaScript which also has a dark mode.
by printfn rust
53 MIT
Arbitrary-precision unit-aware calculator
by tchar python
43 MIT
A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.
by badamczewski csharp
36 MIT
A REPL calculator and an x86 asm emulator for developers
by JingOS-team c++
35
Jing-Kalk is a beautifully designed calculator that conforms to the JingOS style and Integrating the interactive experience of pad and PC.
Top Authors in Apps
1
5 Libraries
47
2
4 Libraries
8
3
4 Libraries
8
4
3 Libraries
14
5
3 Libraries
18
6
3 Libraries
6
7
3 Libraries
540
8
3 Libraries
15
9
3 Libraries
94
10
3 Libraries
12
1
5 Libraries
47
2
4 Libraries
8
3
4 Libraries
8
4
3 Libraries
14
5
3 Libraries
18
6
3 Libraries
6
7
3 Libraries
540
8
3 Libraries
15
9
3 Libraries
94
10
3 Libraries
12
Trending Kits in Apps
Python is a high-level programming language for general purpose. It's a great language for building web applications, but it can also be used to develop applications for desktop and mobile. Python is a mature and powerful programming language that has gained momentum in recent years. Python’s syntax is well designed and easy to learn compared to other programming languages. It is becoming more popular as a language for data science and machine learning. This popularity has led to a large amount of new libraries, packages and frameworks being developed for the language. Python also has a large standard library with pre-written code that can be reused in the projects. Popular Python Application open source libraries for developers include: flask - The Python micro framework for building web applications; sentry - crossplatform application monitoring; ray - open source framework that provides a simple, universal API.
Java is one of the most used programming language. It's fast, can run on almost any operating system, and is being updated constantly to improve security. It is platform independent makes it is a great choice for developers to build enterprise-grade applications and it allows multiple inheritance. It is used in building highly efficient software with minimum code. It is also popular because it has a rich set of open source libraries that can be used in developing applications across various domains. Java open source libraries are the best tools for developers to implement and develop the Java application with more features. Some of the most widely used Java Application open source libraries among developers include: jib - Build container images for your Java applications; spring-boot-admin - Admin UI for administration of spring boot applications; micronaut-core - Micronaut Application Framework.
JavaScript has been among the most popular programming languages for a long time. It is an essential part of any front-end web development and can be used in almost any project. It's versatile and has a wide range of applications, from small mobile applications to enterprise-level server apps. JavaScript is a very resourceful and powerful language that gives you the power to create interactive web pages. It is used by the majority of developers because of its flexibility and simplicity. JavaScript provides tons of tools and frameworks to make the life easier as a developer. JavaScript Application libraries are actually codes that were previously written by people. These codes were written with a particular purpose of helping a programmer in building an application. A few of the most popular open source libraries for JavaScript Application developers are: nw.js - js modules directly from DOM/WebWorker and enable a new way; ember.js - JavaScript framework for creating ambitious web applications; hyperapp - The tiny framework for building hypertext applications.
The world of software development is evolving at a fast pace. It's no secret that the process of coding a desktop application from scratch can sometimes be extremely frustrating and time-consuming. Open-source libraries are a boon to programmers around the world. They save you time and effort, and prevent you from reinventing the wheel. C# application can be easily developed by using the open source libraries. The libraries are the set of functions that are used by the programmers to develop a web application. Some of the most widely used open source libraries for C# Application among developers include: ArchiSteamFarm - primary purpose of idling Steam cards | Video Game library; C-sharp-console-gui-framework - A GUI framework for C# console applications; GeneticSharp - multithreading C# Genetic Algorithm library; High-Speed-Priority-Queue-for-C-Sharp - A C# priority queue optimized for pathfinding applications.
Ruby is a dynamic, general-purpose programming language. It has an elegant syntax that's natural to read and easy to write. It is cross-platform, it can run on a variety of platforms, including Linux, Mac OS X, Windows, iOS and Android. It is powerful, secure and easy to learn. A Ruby application can be easily developed by using the open source libraries. The libraries are the set of functions that are used by the programmers to develop a web application. Ruby has been used to write programs that control robots, drive cars, and help power the websites of such organizations as NASA, Twitter, and the New York Times. Developers tend to use some of the following Ruby Application open source libraries: activeadmin - The administration framework for Ruby on Rails applications; brakeman - static analysis security vulnerability scanner; draper - Decorators/ViewModels for Rails Applications.
Go Application is a powerful and simple programming language which provides a lot of features like concurrency, parallelism, and simplicity. Go Application is a dynamic language that often used for web development. Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. Go was developed by Google in 2007 with the aim of being an open source language that would be used for infrastructure software development. Its concurrency features make it a good choice for building systems that require high availability, such as Google's search engine. It is used by companies like Google, Red Hat, Digital Ocean, and Trello for some of their critical infrastructure. Some of the most widely used open source libraries for Go Application among developers include: traefik - The Cloud Native Application Proxy; gotty - are your terminal as a web application; gf - GoFrame is a modular, powerful, highperformance and enterpriseclass application development framework of Golang.
PHP is an open source programming language that is used to create dynamic web pages. PHP was created by Rasmus Lerdorf in 1994, and it was released as free software on the Internet. The latest version of PHP is 7.3, which contains many new features and bug fixes. PHP applications are the most common way to add dynamic functionality to web pages. It is one of the most popular programming languages in the world, with a market share of around 82%. They allow to develop applications more quickly and easily, and they can be used in a variety of industries, including ecommerce, education, health care and finance. A few of the most popular PHP Application open source libraries for developers are: Slim - PHP micro framework; wallabag - self hostable application for saving web pages; php-pm - process manager, supercharger and load balancer.
C++ programming language is a general-purpose, statically typed, free and open-source software language. It was developed by Bjarne Stroustrup at Bell Labs between 1979 and 1985. It supports object-oriented, imperative, and generic programming paradigms. C++ is a very powerful programming language that is used to develop many types of applications. It is one of the most popular languages in the world. These libraries make it easy for developers to build C++ applications that are modular, scalable and high performing. C++ is used for operating system development, desktop applications, mobile apps, and games. It provides a lot of flexibility, and it is used in many different areas. Some of the most popular C++ Application Open Source libraries among developers are: dlib - A toolkit for making real world machine learning and data analysis applications in C; drogon - Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows; oatpp - Light and powerful C web framework for highly scalable and resourceefficient web application.
PHP is one of the most popular server-side scripting languages in the world. It boasts a huge community of developers and thousands of third-party libraries that together help to enhance its functionality. Predictive analytics is the branch of the advanced analytics which is used to make predictions about unknown future events. Predictive analytics uses many techniques from data mining, statistics, modeling, machine learning, and artificial intelligence to analyze current data to make predictions about future. Predictive analytics is used in automated systems such as recommendation engines and fraud detection programs. In business, predictive models exploit patterns found in historical and transactional data to identify risks and opportunities. Some of the most popular PHP Predictive Analytics Open Source libraries among developers are: predictionio-sdk-php - PredictionIO PHP SDK; prediction-builder - machine learning that builds predictions using; Divorce - K Nearest Neighbors algorithm.
JavaScript is an object-oriented and functional programming language, used primarily for web development. JavaScript is a computer programming language. It is web based and used to build client side web applications. JavaScript has become very popular in the recent years because of its simplicity, flexibility and easiness to work with it. JavaScript is a dynamic programming language, which means that the code can be changed at runtime by making changes to the program's "state" rather than recompiling and restarting the application. There are lots of open source libraries available for JavaScript, which are used by developers to create web applications easily. JavaScript Web Application Open Source libraries provides a wide range of features like flexbox, grid system and virtual DOM. There are several popular JavaScript Web Application open source libraries available for developers: awesome-selfhosted - Free Software network services and web applications; nw.js - js modules directly from DOM/WebWorker and enable a new way; hackathon-starter - A boilerplate for Node.js web applications.
Python is an interpreted, interactive, object-oriented programming language. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python is a flexible and powerful programming language that started in 1991, and has become one of the most popular programming languages in the world. It is used for many different types of applications, from web applications to desktop software. Python is a general-purpose programming language that works well for both small one-off projects and large applications, as it's easy to read and write. Popular open source libraries for Python Web Application include: flask - The Python micro framework for building web applications; PayloadsAllTheThings - useful payloads and bypass for Web Application Security; bottle - simple microframework for python webapplications.
Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. It was designed and developed in the mid-1990s by Yukihiro "Matz" Matsumoto in Japan. It has an elegant syntax that is natural to read and easy to write. The name “Ruby” originated during an online chat session between Matsumoto and Keiju Ishitsuka on February 24, 1993. Ruby Web Application framework that includes everything needed to create database-driven websites, APIs, and microservices. It was created in 2004 by David Heinemeier Hansson. It supports multiple programming paradigms, including functional, object-oriented (class-based), and imperative. It also has a dynamic type system and automatic memory management. Many developers depend on the following Ruby Web Application open source libraries: capybara - Acceptance test framework for web applications; arachni - Web Application Security Scanner Framework; mailboxer - A Rails gem to send messages inside a web application.
C# is a general-purpose programming language that is designed to be simple, concise and easy to use. C# is one of the most widely used programming languages in the world and is a great choice for building cross-platform web applications. It is developed by Microsoft and also it is a very popular language for writing Windows programs, but it also runs on the Mac and Unix machines. C# is an object-oriented programming language that uses elements of functional programming and aspect-oriented programming. C# is a great language to use for creating web applications. Some of the most widely used open source libraries for C# Web Application among developers include: aspnetcore - NET Core is a crossplatform .NET framework; aspnetboilerplate - ASP.NET Boilerplate Web Application Framework; abp - Open Source Web Application Framework for ASP.NET Core.
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. It was developed by Google in 2009 by Robert Griesemer, Rob Pike, and Ken Thompson. Go is a statically typed language with memory safety. It's also free and open source. Go is a compiled language and compiles directly into machine code. The syntax is clean, simple and easy to understand. Go also has a built-in testing framework which makes it easy to write tests for the application. It has a lot of web frameworks available for it which makes it easy to write complex web applications in Go. Some of the most widely used open source libraries for Go Web Application among developers include: gotty - Share your terminal as a web application; goth - Package goth provides a simple, clean, and idiomatic way; web - The easiest way to create web applications with Go.
C++ is a general-purpose programming language that's been around for decades. It's often used for low-level systems programming, but it can also be used for application development. C++ is an object-oriented programming language that supports procedural programming and data abstraction. A web application is a software program that runs over the internet. It has also been widely used for video games, desktop applications, and other software where efficiency is important. It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights. Some of the most popular C++ Web Application Open Source libraries among developers are: drogon - Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows; oatpp - Light and powerful C web framework for highly scalable and resourceefficient web application; treefrog-framework - TreeFrog Framework : Highspeed C MVC Framework for Web Application.
PHP is one of the most popular programming languages in the world. It is used by millions of developers around the globe to create web applications and desktop apps. PHP was originally developed by Rasmus Lerdorf in 1994 as a set of Common Gateway Interface (CGI) scripts to be used on his online resume. The early days of PHP were rough, but it has become one of the most widely used server-side scripting languages today. It is widely used for web development and can be embedded into HTML or other websites. It's also used in many popular frameworks like Laravel, CodeIgniter and Yii. A few of the most popular PHP Web Application open source libraries for developers are: Slim - PHP micro framework; wallabag - self hostable application for saving web pages; DVWA - Damn Vulnerable Web Application.
Java is one of the most popular programming languages in the world. It has been around since 1995 and it’s used in every aspect of software development – from enterprise applications to games, mobile applications and more. Java is so popular because it’s a great programming language for building cross-platform applications. Java Web Application libraries are an integral part of the Java ecosystem. They provide a great way to extend the functionality of the application and make it more powerful. These libraries can be used to perform a variety of tasks, such as: User authentication, File upload/download, Data validation, Data formatting and conversion and Web services integration. Developers tend to use some of the following Java Web Application open source libraries are: framework - Vaadin 6, 7, 8 is a Java framework; find-sec-bugs - SpotBugs plugin for security audits of Java web applications; openmrs-core - OpenMRS API and web application code.
Trending Discussions on Apps
Error: MainActivity must extend android.app.Activity [Instantiatable]
Google OAuth 2.0 failing with Error 400: invalid_request for some client_id, but works well for others in the same project
Action requested: Declare your Ad ID permission
ASP.NET Core 6 how to access Configuration during startup
How to use appsettings.json in Asp.net core 6 Program.cs file
android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify
App Engine Python 2.7 - ImportError: cannot import name apiproxy
Log4j vulnerability - Is Log4j 1.2.17 vulnerable (was unable to find any JNDI code in source)?
My project doesn't compile with optimization parameters after upgrading from angular 11 to angular 12
How to set max-height of dropdown selection area?
QUESTION
Error: MainActivity must extend android.app.Activity [Instantiatable]
Asked 2022-Mar-31 at 02:13I tried upgrading Android Gradle Plugin from 4.2.2 to 7.0.1 using the upgrade assistant which is available in Android Studio at Tools > AGP Upgrade Assistant. The only change it made was to my project-level build.gradle file:
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11
However, now when I run ./gradlew assemble assembleAndroidTest
I get the following error:
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12 android:name="com.locuslabs.appsdk.MainActivity"
13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 Explanation for issues of type "Instantiatable":
15 Activities, services, broadcast receivers etc. registered in the manifest
16 file (or for custom views, in a layout file) must be "instantiatable" by
17 the system, which means that the class must be public, it must have an
18 empty public constructor, and if it's an inner class, it must be a static
19 inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25 lintOptions {
26 checkReleaseBuilds false
27 // Or, if you prefer, you can continue to check for errors in release builds,
28 // but continue the build even when errors are found:
29 abortOnError false
30 }
31}
32
My project is multi-module, but I don't suspect that as the problem since it's complaining about the application module, not a library module.
I believe my <activity>
tag is well formed in my AndroidManifest.xml for my application module:
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12 android:name="com.locuslabs.appsdk.MainActivity"
13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 Explanation for issues of type "Instantiatable":
15 Activities, services, broadcast receivers etc. registered in the manifest
16 file (or for custom views, in a layout file) must be "instantiatable" by
17 the system, which means that the class must be public, it must have an
18 empty public constructor, and if it's an inner class, it must be a static
19 inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25 lintOptions {
26 checkReleaseBuilds false
27 // Or, if you prefer, you can continue to check for errors in release builds,
28 // but continue the build even when errors are found:
29 abortOnError false
30 }
31}
32 <activity
33 android:name="com.locuslabs.appsdk.MainActivity"
34 android:label="@string/app_name"
35 android:windowSoftInputMode="adjustNothing">
36 <intent-filter>
37 <action android:name="android.intent.action.MAIN" />
38
39 <category android:name="android.intent.category.LAUNCHER" />
40 </intent-filter>
41 </activity>
42
Furthermore, I don't think there is anything wrong with extending AppCompatActivity
instead of android.app.Activity
as I'm doing in my MainActivity.kt:
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12 android:name="com.locuslabs.appsdk.MainActivity"
13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 Explanation for issues of type "Instantiatable":
15 Activities, services, broadcast receivers etc. registered in the manifest
16 file (or for custom views, in a layout file) must be "instantiatable" by
17 the system, which means that the class must be public, it must have an
18 empty public constructor, and if it's an inner class, it must be a static
19 inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25 lintOptions {
26 checkReleaseBuilds false
27 // Or, if you prefer, you can continue to check for errors in release builds,
28 // but continue the build even when errors are found:
29 abortOnError false
30 }
31}
32 <activity
33 android:name="com.locuslabs.appsdk.MainActivity"
34 android:label="@string/app_name"
35 android:windowSoftInputMode="adjustNothing">
36 <intent-filter>
37 <action android:name="android.intent.action.MAIN" />
38
39 <category android:name="android.intent.category.LAUNCHER" />
40 </intent-filter>
41 </activity>
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45 // ...
46}
47
I'm concerned that Android Gradle Plugin 7.0.1 is not really ready for prime-time because the Android Gradle Plugin documentation still says classpath 'com.android.tools.build:gradle:4.2.0'
instead of 7.0.1.
I saw that the Android Gradle Plugin 7.0.1 release notes mentioned some changes to linting but none of those changes seemed relevant to me.
I also skimmed through the Android Gradle Plugin source code to see if I could find the linting stage any identify any changes but it looked like a lot of work to find that code and do that analysis.
I searched for answers but all I could find were these two stackoverflow entries where the error was legitimate and the programmer just needed to change their code to ensure they were referencing an actual Activity
:
- Android Studio Error: Activity must extend android.app.activity
- MainActivity cannot be cast to android.app.Activity
I also tried Android Gradle Plugin 7.0.0 but got the same error. Only Android Gradle Plugin 4.2.2 prevents the error.
Is this a bug in Android Gradle Plugin 7.0.1?
Update: could not disable Instantiatable
I tried to disable the Instantiatable
lint error the following ways but none of them prevented the error.
First, I tried adding disable "Instantiatable"
to my application-level build.gradle file:
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12 android:name="com.locuslabs.appsdk.MainActivity"
13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 Explanation for issues of type "Instantiatable":
15 Activities, services, broadcast receivers etc. registered in the manifest
16 file (or for custom views, in a layout file) must be "instantiatable" by
17 the system, which means that the class must be public, it must have an
18 empty public constructor, and if it's an inner class, it must be a static
19 inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25 lintOptions {
26 checkReleaseBuilds false
27 // Or, if you prefer, you can continue to check for errors in release builds,
28 // but continue the build even when errors are found:
29 abortOnError false
30 }
31}
32 <activity
33 android:name="com.locuslabs.appsdk.MainActivity"
34 android:label="@string/app_name"
35 android:windowSoftInputMode="adjustNothing">
36 <intent-filter>
37 <action android:name="android.intent.action.MAIN" />
38
39 <category android:name="android.intent.category.LAUNCHER" />
40 </intent-filter>
41 </activity>
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45 // ...
46}
47android {
48 lintOptions {
49 disable "Instantiatable"
50 }
51}
52
Second, I tried prepending @SdkSuppress("Instantiatable")
to the class:
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12 android:name="com.locuslabs.appsdk.MainActivity"
13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 Explanation for issues of type "Instantiatable":
15 Activities, services, broadcast receivers etc. registered in the manifest
16 file (or for custom views, in a layout file) must be "instantiatable" by
17 the system, which means that the class must be public, it must have an
18 empty public constructor, and if it's an inner class, it must be a static
19 inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25 lintOptions {
26 checkReleaseBuilds false
27 // Or, if you prefer, you can continue to check for errors in release builds,
28 // but continue the build even when errors are found:
29 abortOnError false
30 }
31}
32 <activity
33 android:name="com.locuslabs.appsdk.MainActivity"
34 android:label="@string/app_name"
35 android:windowSoftInputMode="adjustNothing">
36 <intent-filter>
37 <action android:name="android.intent.action.MAIN" />
38
39 <category android:name="android.intent.category.LAUNCHER" />
40 </intent-filter>
41 </activity>
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45 // ...
46}
47android {
48 lintOptions {
49 disable "Instantiatable"
50 }
51}
52@SdkSuppress("Instantiatable")
53class MainActivity : AppCompatActivity() {
54 // ...
55}
56
Similarly, I tried @SuppressLint("Instantiatable")
but that didn't work either.
ANSWER
Answered 2021-Aug-24 at 16:35the Android Gradle Plugin documentation still says classpath 'com.android.tools.build:gradle:4.2.0' instead of 7.0.1.
You need to read further down the page, to this and this. That table is only relevant for pre-7.0.0 versions.
Is this a bug in Android Gradle Plugin 7.0.1?
Quite possibly. Or, perhaps beyond, as the Instantiatable
Lint check has a history of problems.
If your scenario does not match one of those three August 2021 bugs, and you are in position to provide a reproducible test case, file a fresh issue! Beyond that, if a clean-and-rebuild is not clearing up your problem, you might need to simply disable the Instantiatable
Lint check for the time being by adding the following to all of your build.gradle files at the application or library level (i.e. all except your project-level build.gradle):
1buildscript {
2 repositories {
3 google()
4 mavenCentral()
5 }
6 dependencies {
7 classpath 'com.android.tools.build:gradle:7.0.1' // changed from 4.2.2 to 7.0.1
8 // ...
9 }
10}
11/builds/locuslabs/android-team/locuslabs-android-sdk/app/src/main/AndroidManifest.xml:21: Error: MainActivity must extend android.app.Activity [Instantiatable]
12 android:name="com.locuslabs.appsdk.MainActivity"
13 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14 Explanation for issues of type "Instantiatable":
15 Activities, services, broadcast receivers etc. registered in the manifest
16 file (or for custom views, in a layout file) must be "instantiatable" by
17 the system, which means that the class must be public, it must have an
18 empty public constructor, and if it's an inner class, it must be a static
19 inner class.
201 errors, 0 warnings
21Lint found fatal errors while assembling a release target.
22To proceed, either fix the issues identified by lint, or modify your build script as follows:
23...
24android {
25 lintOptions {
26 checkReleaseBuilds false
27 // Or, if you prefer, you can continue to check for errors in release builds,
28 // but continue the build even when errors are found:
29 abortOnError false
30 }
31}
32 <activity
33 android:name="com.locuslabs.appsdk.MainActivity"
34 android:label="@string/app_name"
35 android:windowSoftInputMode="adjustNothing">
36 <intent-filter>
37 <action android:name="android.intent.action.MAIN" />
38
39 <category android:name="android.intent.category.LAUNCHER" />
40 </intent-filter>
41 </activity>
42import androidx.appcompat.app.AppCompatActivity
43
44class MainActivity : AppCompatActivity() {
45 // ...
46}
47android {
48 lintOptions {
49 disable "Instantiatable"
50 }
51}
52@SdkSuppress("Instantiatable")
53class MainActivity : AppCompatActivity() {
54 // ...
55}
56android {
57 lintOptions {
58 disable "Instantiatable"
59 }
60}
61
QUESTION
Google OAuth 2.0 failing with Error 400: invalid_request for some client_id, but works well for others in the same project
Asked 2022-Mar-30 at 14:21We have some apps (or maybe we should call them a handful of scripts) that use Google APIs to facilitate some administrative tasks. Recently, after making another client_id in the same project, I started getting an error message similar to the one described in localhost redirect_uri does not work for Google Oauth2 (results in 400: invalid_request error). I.e.,
Error 400: invalid_request
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure.
You can let the app developer know that this app doesn't comply with one or more Google validation rules.
Request details:
The content in this section has been provided by the app developer. This content has not been reviewed or verified by Google.
If you’re the app developer, make sure that these request details comply with Google policies.
redirect_uri: urn:ietf:wg:oauth:2.0:oob
How do I get through this error? It is important to note that:
- The OAuth consent screen for this project is marked as "Internal". Therefore any mentions of Google review of the project, or publishing status are irrelevant
- I do have "Trust internal, domain-owned apps" enabled for the domain
- Another client id in the same project works and there are no obvious differences between the client IDs - they are both "Desktop" type which only gives me a Client ID and Client secret that are different
- This is a command line script, so I use the "copy/paste" verification method as documented here hence the
urn:ietf:wg:oauth:2.0:oob
redirect URI (copy/paste is the only friendly way to run this on a headless machine which has no browser). - I was able to reproduce the same problem in a dev domain. I have three client ids. The oldest one is from January 2021, another one from December 2021, and one I created today - March 2022. Of those, only the December 2021 works and lets me choose which account to authenticate with before it either accepts it or rejects it with "Error 403: org_internal" (this is expected). The other two give me an "Error 400: invalid_request" and do not even let me choose the "internal" account. Here are the URLs generated by my app (I use the ruby google client APIs) and the only difference between them is the client_id - January 2021, December 2021, March 2022.
Here is the part of the code around the authorization flow, and the URLs for the different client IDs are what was produced on the $stderr.puts url
line. It is pretty much the same thing as documented in the official example here (version as of this writing).
1
2OOB_URI = 'urn:ietf:wg:oauth:2.0:oob'
3
4def user_credentials_for(scope, user_id = 'default')
5 token_store = Google::Auth::Stores::FileTokenStore.new(:file => token_store_path)
6 authorizer = Google::Auth::UserAuthorizer.new(client_id, scope, token_store)
7 credentials = authorizer.get_credentials(user_id)
8 if credentials.nil?
9 url = authorizer.get_authorization_url(base_url: OOB_URI)
10 $stderr.puts ""
11 $stderr.puts "-----------------------------------------------"
12 $stderr.puts "Requesting authorization for '#{user_id}'"
13 $stderr.puts "Open the following URL in your browser and authorize the application."
14 $stderr.puts url
15 code = $stdin.readline.chomp
16 $stderr.puts "-----------------------------------------------"
17 credentials = authorizer.get_and_store_credentials_from_code(
18 user_id: user_id, code: code, base_url: OOB_URI)
19 end
20 credentials
21end
22
23
ANSWER
Answered 2022-Mar-02 at 07:56steps.oauth.v2.invalid_request 400 This error name is used for multiple different kinds of errors, typically for missing or incorrect parameters sent in the request. If is set to false, use fault variables (described below) to retrieve details about the error, such as the fault name and cause.
- GenerateAccessToken GenerateAuthorizationCode
- GenerateAccessTokenImplicitGrant
- RefreshAccessToken
QUESTION
Action requested: Declare your Ad ID permission
Asked 2022-Mar-15 at 13:37Today i have got this email:
Last July, we announced Advertising policy changes to help bolster security and privacy. We added new restrictions on identifiers used by apps that target children. When users choose to delete their advertising ID in order to opt out of personalization advertising, developers will receive a string of zeros instead of the identifier if they attempt to access the identifier. This behavior will extend to phones, tablets, and Android TV starting April 1, 2022. We also announced that you need to declare an AD_ID permission when you update your app targeting API level to 31 (Android 12). Today, we are sharing that we will give developers more time to ease the transition. We will require this permission declaration when your apps are able to target Android 13 instead of starting with Android 12.
Action Items If you use an advertising ID, you must declare the AD_ID Permission when your app targets Android 13 or above. Apps that don’t declare the permission will get a string of zeros. Note: You’ll be able to target Android 13 later this year. If your app uses an SDK that has declared the Ad ID permission, it will acquire the permission declaration through manifest merge. If your app’s target audience includes children, you must not transmit Android Advertising ID (AAID) from children or users of unknown age.
My app is not using the Advertising ID. Should i declare the AD_ID
Permission in Manifest or not?
ANSWER
Answered 2022-Mar-14 at 20:51Google describe here how to solve
https://support.google.com/googleplay/android-developer/answer/6048248?hl=en
Add in manifest
1<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
2
QUESTION
ASP.NET Core 6 how to access Configuration during startup
Asked 2022-Mar-08 at 11:45In earlier versions, we had Startup.cs class and we get configuration object as follows in the Startup file.
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23
Now in .NET 6 (With Visual Studio 2022), we don't see the Startup.cs class. Looks like its days are numbered. So how do we get these objects like Configuration(IConfiguration) and Hosting Environment(IHostEnvironment)
How do we get these objects, to say read the configuration from appsettings? Currently the Program.cs file looks like this.
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23using Festify.Database;
24using Microsoft.EntityFrameworkCore;
25
26var builder = WebApplication.CreateBuilder(args);
27
28// Add services to the container.
29builder.Services.AddRazorPages();
30
31builder.Services.AddDbContext<FestifyContext>();
32
33
34////////////////////////////////////////////////
35// The following is Giving me error as Configuration
36// object is not avaible, I dont know how to inject this here.
37////////////////////////////////////////////////
38
39
40builder.Services.AddDbContext<FestifyContext>(opt =>
41 opt.UseSqlServer(
42 Configuration.GetConnectionString("Festify")));
43
44
45var app = builder.Build();
46
47// Configure the HTTP request pipeline.
48if (!app.Environment.IsDevelopment())
49{
50 app.UseExceptionHandler("/Error");
51 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
52 app.UseHsts();
53}
54
55app.UseHttpsRedirection();
56app.UseStaticFiles();
57
58app.UseRouting();
59
60app.UseAuthorization();
61
62app.MapRazorPages();
63
64app.Run();
65
I want to know how to read the configuration from appsettings.json ?
ANSWER
Answered 2021-Oct-26 at 12:26WebApplicationBuilder
returned by WebApplication.CreateBuilder(args)
exposes Configuration
and Environment
properties:
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23using Festify.Database;
24using Microsoft.EntityFrameworkCore;
25
26var builder = WebApplication.CreateBuilder(args);
27
28// Add services to the container.
29builder.Services.AddRazorPages();
30
31builder.Services.AddDbContext<FestifyContext>();
32
33
34////////////////////////////////////////////////
35// The following is Giving me error as Configuration
36// object is not avaible, I dont know how to inject this here.
37////////////////////////////////////////////////
38
39
40builder.Services.AddDbContext<FestifyContext>(opt =>
41 opt.UseSqlServer(
42 Configuration.GetConnectionString("Festify")));
43
44
45var app = builder.Build();
46
47// Configure the HTTP request pipeline.
48if (!app.Environment.IsDevelopment())
49{
50 app.UseExceptionHandler("/Error");
51 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
52 app.UseHsts();
53}
54
55app.UseHttpsRedirection();
56app.UseStaticFiles();
57
58app.UseRouting();
59
60app.UseAuthorization();
61
62app.MapRazorPages();
63
64app.Run();
65var builder = WebApplication.CreateBuilder(args);
66
67// Add services to the container.
68...
69ConfigurationManager configuration = builder.Configuration;
70IWebHostEnvironment environment = builder.Environment;
71
WebApplication
returned by WebApplicationBuilder.Build()
also exposes Configuration
and Environment
:
1public class Startup
2{
3 private readonly IHostEnvironment environment;
4 private readonly IConfiguration config;
5
6 public Startup(IConfiguration configuration, IHostEnvironment environment)
7 {
8 this.config = configuration;
9 this.environment = environment;
10 }
11
12 public void ConfigureServices(IServiceCollection services)
13 {
14 // Add Services
15 }
16
17 public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
18 {
19 // Add Middlewares
20 }
21
22}
23using Festify.Database;
24using Microsoft.EntityFrameworkCore;
25
26var builder = WebApplication.CreateBuilder(args);
27
28// Add services to the container.
29builder.Services.AddRazorPages();
30
31builder.Services.AddDbContext<FestifyContext>();
32
33
34////////////////////////////////////////////////
35// The following is Giving me error as Configuration
36// object is not avaible, I dont know how to inject this here.
37////////////////////////////////////////////////
38
39
40builder.Services.AddDbContext<FestifyContext>(opt =>
41 opt.UseSqlServer(
42 Configuration.GetConnectionString("Festify")));
43
44
45var app = builder.Build();
46
47// Configure the HTTP request pipeline.
48if (!app.Environment.IsDevelopment())
49{
50 app.UseExceptionHandler("/Error");
51 // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
52 app.UseHsts();
53}
54
55app.UseHttpsRedirection();
56app.UseStaticFiles();
57
58app.UseRouting();
59
60app.UseAuthorization();
61
62app.MapRazorPages();
63
64app.Run();
65var builder = WebApplication.CreateBuilder(args);
66
67// Add services to the container.
68...
69ConfigurationManager configuration = builder.Configuration;
70IWebHostEnvironment environment = builder.Environment;
71var app = builder.Build();
72IConfiguration configuration = app.Configuration;
73IWebHostEnvironment environment = app.Environment;
74
Also check the migration guide and code samples.
QUESTION
How to use appsettings.json in Asp.net core 6 Program.cs file
Asked 2022-Feb-25 at 21:39I'm trying to access appsettings.json in my Asp.net core v6 application Program.cs file, but in this version of .Net the Startup class and Program class are merged together and the using and another statements are simplified and removed from Program.cs. In this situation, How to access IConfiguration or how to use dependency injection for example ?
Edited : Here is my default Program.cs that Asp.net 6 created for me
1var builder = WebApplication.CreateBuilder(args);
2// Add services to the container.
3builder.Services.AddControllers();
4builder.Services.AddStackExchangeRedisCache(options =>
5{
6 options.Configuration = "localhost:6379";
7});
8
9builder.Services.AddSwaggerGen(c =>
10{
11 c.SwaggerDoc("v1", new() { Title = "BasketAPI", Version = "v1" });
12});
13var app = builder.Build();
14// Configure the HTTP request pipeline.
15if (app.Environment.IsDevelopment())
16{
17 app.UseSwagger();
18 app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "BasketAPI v1"));
19}
20app.UseHttpsRedirection();
21app.UseAuthorization();
22app.MapControllers();
23app.Run();
24
For example , I want to use appsettings.json instead of hard typed connectionstring in this line :
1var builder = WebApplication.CreateBuilder(args);
2// Add services to the container.
3builder.Services.AddControllers();
4builder.Services.AddStackExchangeRedisCache(options =>
5{
6 options.Configuration = "localhost:6379";
7});
8
9builder.Services.AddSwaggerGen(c =>
10{
11 c.SwaggerDoc("v1", new() { Title = "BasketAPI", Version = "v1" });
12});
13var app = builder.Build();
14// Configure the HTTP request pipeline.
15if (app.Environment.IsDevelopment())
16{
17 app.UseSwagger();
18 app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "BasketAPI v1"));
19}
20app.UseHttpsRedirection();
21app.UseAuthorization();
22app.MapControllers();
23app.Run();
24options.Configuration = "localhost:6379";
25
ANSWER
Answered 2021-Sep-30 at 11:13Assuming an appsettings.json
1var builder = WebApplication.CreateBuilder(args);
2// Add services to the container.
3builder.Services.AddControllers();
4builder.Services.AddStackExchangeRedisCache(options =>
5{
6 options.Configuration = "localhost:6379";
7});
8
9builder.Services.AddSwaggerGen(c =>
10{
11 c.SwaggerDoc("v1", new() { Title = "BasketAPI", Version = "v1" });
12});
13var app = builder.Build();
14// Configure the HTTP request pipeline.
15if (app.Environment.IsDevelopment())
16{
17 app.UseSwagger();
18 app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "BasketAPI v1"));
19}
20app.UseHttpsRedirection();
21app.UseAuthorization();
22app.MapControllers();
23app.Run();
24options.Configuration = "localhost:6379";
25{
26 "RedisCacheOptions" : {
27 "Configuration": "localhost:6379"
28 }
29}
30
There is nothing stopping you from building a configuration object to extract the desired settings.
1var builder = WebApplication.CreateBuilder(args);
2// Add services to the container.
3builder.Services.AddControllers();
4builder.Services.AddStackExchangeRedisCache(options =>
5{
6 options.Configuration = "localhost:6379";
7});
8
9builder.Services.AddSwaggerGen(c =>
10{
11 c.SwaggerDoc("v1", new() { Title = "BasketAPI", Version = "v1" });
12});
13var app = builder.Build();
14// Configure the HTTP request pipeline.
15if (app.Environment.IsDevelopment())
16{
17 app.UseSwagger();
18 app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "BasketAPI v1"));
19}
20app.UseHttpsRedirection();
21app.UseAuthorization();
22app.MapControllers();
23app.Run();
24options.Configuration = "localhost:6379";
25{
26 "RedisCacheOptions" : {
27 "Configuration": "localhost:6379"
28 }
29}
30IConfiguration configuration = new ConfigurationBuilder()
31 .AddJsonFile("appsettings.json")
32 .Build();
33
34var builder = WebApplication.CreateBuilder(args);
35// Add services to the container.
36builder.Services.AddControllers();
37builder.Services.AddStackExchangeRedisCache(options => {
38 options.Configuration = configuration["RedisCacheOptions:Configuration"];
39});
40
41//...
42
QUESTION
android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify
Asked 2022-Feb-23 at 14:13After upgrading to android 12, the application is not compiling. It shows
"Manifest merger failed with multiple errors, see logs"
Error showing in Merged manifest:
Merging Errors: Error: android:exported needs to be explicitly specified for . Apps targeting Android 12 and higher are required to specify an explicit value for
android:exported
when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details. main manifest (this file)
I have set all the activity with android:exported="false"
. But it is still showing this issue.
My manifest file:
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 package="eu.siacs.conversations">
5
6 <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10 <uses-permission android:name="android.permission.READ_CONTACTS" />
11 <uses-permission android:name="android.permission.READ_PROFILE" />
12 <uses-permission
13 android:name="android.permission.READ_PHONE_STATE"
14 android:maxSdkVersion="22" />
15 <uses-permission android:name="android.permission.INTERNET" />
16 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17 <uses-permission android:name="android.permission.WAKE_LOCK" />
18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27 <uses-feature
28 android:name="android.hardware.location"
29 android:required="false" />
30 <uses-feature
31 android:name="android.hardware.location.gps"
32 android:required="false" />
33 <uses-feature
34 android:name="android.hardware.location.network"
35 android:required="false" />
36
37 <uses-permission android:name="android.permission.CAMERA" />
38 <uses-permission android:name="android.permission.RECORD_AUDIO" />
39 <uses-permission android:name="android.permission.BLUETOOTH" />
40 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44 <uses-feature
45 android:name="android.hardware.camera"
46 android:required="false" />
47 <uses-feature
48 android:name="android.hardware.camera.autofocus"
49 android:required="false" />
50 <uses-feature
51 android:name="android.hardware.microphone"
52 android:required="false" />
53
54 <application
55 android:name=".Application"
56 android:allowBackup="false"
57 android:allowClearUserData="true"
58 android:appCategory="social"
59 android:hardwareAccelerated="true"
60 android:icon="@mipmap/ic_app_launch"
61 android:label="@string/app_name"
62 android:largeHeap="true"
63 android:networkSecurityConfig="@xml/network_security_configuration"
64 android:requestLegacyExternalStorage="true"
65 android:roundIcon="@mipmap/ic_app_launch_round"
66 android:theme="@style/ConversationsTheme"
67 android:usesCleartextTraffic="true"
68 android:windowSoftInputMode="adjustPan|adjustResize"
69 tools:replace="android:label"
70 tools:targetApi="q">
71 <activity
72 android:name=".ui.search.GroupSearchActivity"
73 android:exported="true" />
74 <activity
75 android:name=".ui.profileUpdating.FavouritesActivity"
76 android:exported="true" />
77 <activity
78 android:name=".ui.profileUpdating.NameActivity"
79 android:exported="true" />
80 <activity
81 android:name=".ui.CompulsoryUpdateActivity"
82 android:exported="true" />
83 <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84 android:exported="true" />
85 <activity android:name=".ui.individualList.IndividualListActivity"
86 android:exported="true" />
87 <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88 android:exported="true" />
89 <activity android:name=".ui.login.otpActivity.OTPActivity"
90 android:exported="true" />
91 <activity android:name=".ui.login.loginActivity.LoginActivity"
92 android:exported="true" />
93
94 <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96 <receiver android:name=".services.EventReceiver"
97 android:exported="true">
98 <intent-filter>
99 <action android:name="android.intent.action.BOOT_COMPLETED" />
100 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101 <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102 <action android:name="android.media.RINGER_MODE_CHANGED" />
103 </intent-filter>
104 </receiver>
105
106 <activity
107 android:name=".ui.ShareLocationActivity"
108 android:label="@string/title_activity_share_location"
109 android:exported="true"/>
110 <activity
111 android:name=".ui.SearchActivity"
112 android:label="@string/search_messages"
113 android:exported="true" />
114 <activity
115 android:name=".ui.RecordingActivity"
116 android:configChanges="orientation|screenSize"
117 android:theme="@style/ConversationsTheme.Dialog"
118 android:exported="true" />
119 <activity
120 android:name=".ui.ShowLocationActivity"
121 android:label="@string/title_activity_show_location"
122 android:exported="true" />
123 <activity
124 android:name=".ui.SplashActivity"
125 android:theme="@style/SplashTheme"
126 android:exported="true">
127 <intent-filter>
128 <action android:name="android.intent.action.MAIN" />
129
130 <category android:name="android.intent.category.LAUNCHER" />
131 </intent-filter>
132 </activity>
133 <activity
134 android:name=".ui.ConversationsActivity"
135 android:label="@string/app_name"
136 android:launchMode="singleTask"
137 android:minWidth="300dp"
138 android:minHeight="300dp"
139 android:exported="true"
140 android:windowSoftInputMode="stateHidden" />
141 <activity
142 android:name=".ui.ScanActivity"
143 android:screenOrientation="portrait"
144 android:exported="true"
145 android:theme="@style/ConversationsTheme.FullScreen"
146 android:windowSoftInputMode="stateAlwaysHidden" />
147 <activity
148 android:name=".ui.UriHandlerActivity"
149 android:label="@string/app_name"
150 android:exported="true">
151 <intent-filter>
152 <action android:name="android.intent.action.VIEW" />
153
154 <category android:name="android.intent.category.DEFAULT" />
155 <category android:name="android.intent.category.BROWSABLE" />
156
157 <data android:scheme="xmpp" />
158 </intent-filter>
159 <intent-filter android:autoVerify="true">
160 <action android:name="android.intent.action.VIEW" />
161
162 <category android:name="android.intent.category.DEFAULT" />
163 <category android:name="android.intent.category.BROWSABLE" />
164
165 <data android:scheme="https" />
166 <data android:host="im.app.in" />
167 <data android:pathPrefix="/i/" />
168 <data android:pathPrefix="/j/" />
169 </intent-filter>
170 <intent-filter>
171 <action android:name="android.intent.action.SENDTO" />
172
173 <category android:name="android.intent.category.DEFAULT" />
174
175 <data android:scheme="imto" />
176 <data android:host="jabber" />
177 </intent-filter>
178 </activity>
179 <activity
180 android:name=".ui.StartConversationActivity"
181 android:label="@string/title_activity_start_conversation"
182 android:launchMode="singleTop"
183 android:exported="true">
184 <intent-filter>
185 <action android:name="android.intent.action.VIEW" />
186 </intent-filter>
187 </activity>
188 <activity
189 android:name=".ui.SettingsActivity"
190 android:label="@string/title_activity_settings"
191 android:exported="true">
192 <intent-filter>
193 <action android:name="android.intent.action.MAIN" />
194
195 <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196 </intent-filter>
197 </activity>
198 <activity
199 android:name=".ui.ChooseContactActivity"
200 android:label="@string/title_activity_choose_contact"
201 android:exported="true" />
202 <activity
203 android:name=".ui.BlocklistActivity"
204 android:label="@string/title_activity_block_list"
205 android:exported="true"/>
206 <activity
207 android:name=".ui.ChangePasswordActivity"
208 android:label="@string/change_password_on_server"
209 android:exported="true"/>
210 <activity
211 android:name=".ui.ChooseAccountForProfilePictureActivity"
212 android:enabled="false"
213 android:label="@string/choose_account"
214 android:exported="true">
215 <intent-filter android:label="@string/set_profile_picture">
216 <action android:name="android.intent.action.ATTACH_DATA" />
217
218 <category android:name="android.intent.category.DEFAULT" />
219
220 <data android:mimeType="image/*" />
221 </intent-filter>
222 </activity>
223 <activity
224 android:name=".ui.ShareViaAccountActivity"
225 android:label="@string/title_activity_share_via_account"
226 android:launchMode="singleTop"
227 android:exported="true" />
228 <activity
229 android:name=".ui.EditAccountActivity"
230 android:launchMode="singleTop"
231 android:exported="true"
232 android:windowSoftInputMode="stateHidden|adjustResize" />
233 <activity
234 android:name=".ui.ConferenceDetailsActivity"
235 android:label="@string/action_muc_details"
236 android:exported="true"
237 android:windowSoftInputMode="stateHidden" />
238 <activity
239 android:name=".ui.ContactDetailsActivity"
240 android:exported="true"
241 android:windowSoftInputMode="stateHidden" />
242 <activity
243 android:name=".ui.PublishProfilePictureActivity"
244 android:label="@string/mgmt_account_publish_avatar"
245 android:exported="true"
246 android:windowSoftInputMode="stateHidden" />
247 <activity
248 android:name=".ui.PublishGroupChatProfilePictureActivity"
249 android:exported="true"
250 android:label="@string/group_chat_avatar" />
251 <activity
252 android:name=".ui.ShareWithActivity"
253 android:label="@string/app_name"
254 android:launchMode="singleTop"
255 android:exported="true">
256 <intent-filter>
257 <action android:name="android.intent.action.SEND" />
258 <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260 <category android:name="android.intent.category.DEFAULT" />
261
262 <data android:mimeType="text/plain" />
263 </intent-filter>
264 <intent-filter>
265 <action android:name="android.intent.action.SEND" />
266 <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268 <category android:name="android.intent.category.DEFAULT" />
269
270 <data android:mimeType="*/*" />
271 </intent-filter>
272
273 <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274 <meta-data
275 android:name="android.service.chooser.chooser_target_service"
276 android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277 </activity>
278 <activity
279 android:name=".ui.TrustKeysActivity"
280 android:label="@string/trust_omemo_fingerprints"
281 android:exported="true"
282 android:windowSoftInputMode="stateAlwaysHidden" />
283 <activity
284 android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285 android:exported="true"
286 android:theme="@style/Base.Theme.AppCompat" />
287 <activity android:name=".ui.MemorizingActivity"
288 android:exported="true" />
289 <activity
290 android:name=".ui.MediaBrowserActivity"
291 android:exported="true"
292 android:label="@string/media_browser" />
293
294 <service android:name=".services.ExportBackupService" android:exported="true"/>
295 <service android:name=".services.ImportBackupService" android:exported="true"/>
296 <service
297 android:name=".services.ContactChooserTargetService"
298 android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299 android:exported="true">
300 <intent-filter>
301 <action android:name="android.service.chooser.ChooserTargetService" />
302 </intent-filter>
303 </service>
304 <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306 <provider
307 android:name="androidx.core.content.FileProvider"
308 android:authorities="${applicationId}.files"
309 android:exported="false"
310 android:grantUriPermissions="true">
311 <meta-data
312 android:name="android.support.FILE_PROVIDER_PATHS"
313 android:resource="@xml/file_paths" />
314 </provider>
315 <provider
316 android:name=".services.BarcodeProvider"
317 android:authorities="${applicationId}.barcodes"
318 android:exported="false"
319 android:grantUriPermissions="true" />
320
321 <activity
322 android:name=".ui.ShortcutActivity"
323 android:label="@string/contact"
324 android:exported="true">
325 <intent-filter>
326 <action android:name="android.intent.action.CREATE_SHORTCUT" />
327 </intent-filter>
328 </activity>
329 <activity
330 android:name=".ui.MucUsersActivity"
331 android:exported="true"
332 android:label="@string/group_chat_members" />
333 <activity
334 android:name=".ui.ChannelDiscoveryActivity"
335 android:exported="true"
336 android:label="@string/discover_channels" />
337 <activity
338 android:name=".ui.RtpSessionActivity"
339 android:autoRemoveFromRecents="true"
340 android:exported="true"
341 android:launchMode="singleInstance"
342 android:supportsPictureInPicture="true" />
343 </application>
344
345</manifest>
346
My second manifest file:
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 package="eu.siacs.conversations">
5
6 <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10 <uses-permission android:name="android.permission.READ_CONTACTS" />
11 <uses-permission android:name="android.permission.READ_PROFILE" />
12 <uses-permission
13 android:name="android.permission.READ_PHONE_STATE"
14 android:maxSdkVersion="22" />
15 <uses-permission android:name="android.permission.INTERNET" />
16 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17 <uses-permission android:name="android.permission.WAKE_LOCK" />
18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27 <uses-feature
28 android:name="android.hardware.location"
29 android:required="false" />
30 <uses-feature
31 android:name="android.hardware.location.gps"
32 android:required="false" />
33 <uses-feature
34 android:name="android.hardware.location.network"
35 android:required="false" />
36
37 <uses-permission android:name="android.permission.CAMERA" />
38 <uses-permission android:name="android.permission.RECORD_AUDIO" />
39 <uses-permission android:name="android.permission.BLUETOOTH" />
40 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44 <uses-feature
45 android:name="android.hardware.camera"
46 android:required="false" />
47 <uses-feature
48 android:name="android.hardware.camera.autofocus"
49 android:required="false" />
50 <uses-feature
51 android:name="android.hardware.microphone"
52 android:required="false" />
53
54 <application
55 android:name=".Application"
56 android:allowBackup="false"
57 android:allowClearUserData="true"
58 android:appCategory="social"
59 android:hardwareAccelerated="true"
60 android:icon="@mipmap/ic_app_launch"
61 android:label="@string/app_name"
62 android:largeHeap="true"
63 android:networkSecurityConfig="@xml/network_security_configuration"
64 android:requestLegacyExternalStorage="true"
65 android:roundIcon="@mipmap/ic_app_launch_round"
66 android:theme="@style/ConversationsTheme"
67 android:usesCleartextTraffic="true"
68 android:windowSoftInputMode="adjustPan|adjustResize"
69 tools:replace="android:label"
70 tools:targetApi="q">
71 <activity
72 android:name=".ui.search.GroupSearchActivity"
73 android:exported="true" />
74 <activity
75 android:name=".ui.profileUpdating.FavouritesActivity"
76 android:exported="true" />
77 <activity
78 android:name=".ui.profileUpdating.NameActivity"
79 android:exported="true" />
80 <activity
81 android:name=".ui.CompulsoryUpdateActivity"
82 android:exported="true" />
83 <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84 android:exported="true" />
85 <activity android:name=".ui.individualList.IndividualListActivity"
86 android:exported="true" />
87 <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88 android:exported="true" />
89 <activity android:name=".ui.login.otpActivity.OTPActivity"
90 android:exported="true" />
91 <activity android:name=".ui.login.loginActivity.LoginActivity"
92 android:exported="true" />
93
94 <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96 <receiver android:name=".services.EventReceiver"
97 android:exported="true">
98 <intent-filter>
99 <action android:name="android.intent.action.BOOT_COMPLETED" />
100 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101 <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102 <action android:name="android.media.RINGER_MODE_CHANGED" />
103 </intent-filter>
104 </receiver>
105
106 <activity
107 android:name=".ui.ShareLocationActivity"
108 android:label="@string/title_activity_share_location"
109 android:exported="true"/>
110 <activity
111 android:name=".ui.SearchActivity"
112 android:label="@string/search_messages"
113 android:exported="true" />
114 <activity
115 android:name=".ui.RecordingActivity"
116 android:configChanges="orientation|screenSize"
117 android:theme="@style/ConversationsTheme.Dialog"
118 android:exported="true" />
119 <activity
120 android:name=".ui.ShowLocationActivity"
121 android:label="@string/title_activity_show_location"
122 android:exported="true" />
123 <activity
124 android:name=".ui.SplashActivity"
125 android:theme="@style/SplashTheme"
126 android:exported="true">
127 <intent-filter>
128 <action android:name="android.intent.action.MAIN" />
129
130 <category android:name="android.intent.category.LAUNCHER" />
131 </intent-filter>
132 </activity>
133 <activity
134 android:name=".ui.ConversationsActivity"
135 android:label="@string/app_name"
136 android:launchMode="singleTask"
137 android:minWidth="300dp"
138 android:minHeight="300dp"
139 android:exported="true"
140 android:windowSoftInputMode="stateHidden" />
141 <activity
142 android:name=".ui.ScanActivity"
143 android:screenOrientation="portrait"
144 android:exported="true"
145 android:theme="@style/ConversationsTheme.FullScreen"
146 android:windowSoftInputMode="stateAlwaysHidden" />
147 <activity
148 android:name=".ui.UriHandlerActivity"
149 android:label="@string/app_name"
150 android:exported="true">
151 <intent-filter>
152 <action android:name="android.intent.action.VIEW" />
153
154 <category android:name="android.intent.category.DEFAULT" />
155 <category android:name="android.intent.category.BROWSABLE" />
156
157 <data android:scheme="xmpp" />
158 </intent-filter>
159 <intent-filter android:autoVerify="true">
160 <action android:name="android.intent.action.VIEW" />
161
162 <category android:name="android.intent.category.DEFAULT" />
163 <category android:name="android.intent.category.BROWSABLE" />
164
165 <data android:scheme="https" />
166 <data android:host="im.app.in" />
167 <data android:pathPrefix="/i/" />
168 <data android:pathPrefix="/j/" />
169 </intent-filter>
170 <intent-filter>
171 <action android:name="android.intent.action.SENDTO" />
172
173 <category android:name="android.intent.category.DEFAULT" />
174
175 <data android:scheme="imto" />
176 <data android:host="jabber" />
177 </intent-filter>
178 </activity>
179 <activity
180 android:name=".ui.StartConversationActivity"
181 android:label="@string/title_activity_start_conversation"
182 android:launchMode="singleTop"
183 android:exported="true">
184 <intent-filter>
185 <action android:name="android.intent.action.VIEW" />
186 </intent-filter>
187 </activity>
188 <activity
189 android:name=".ui.SettingsActivity"
190 android:label="@string/title_activity_settings"
191 android:exported="true">
192 <intent-filter>
193 <action android:name="android.intent.action.MAIN" />
194
195 <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196 </intent-filter>
197 </activity>
198 <activity
199 android:name=".ui.ChooseContactActivity"
200 android:label="@string/title_activity_choose_contact"
201 android:exported="true" />
202 <activity
203 android:name=".ui.BlocklistActivity"
204 android:label="@string/title_activity_block_list"
205 android:exported="true"/>
206 <activity
207 android:name=".ui.ChangePasswordActivity"
208 android:label="@string/change_password_on_server"
209 android:exported="true"/>
210 <activity
211 android:name=".ui.ChooseAccountForProfilePictureActivity"
212 android:enabled="false"
213 android:label="@string/choose_account"
214 android:exported="true">
215 <intent-filter android:label="@string/set_profile_picture">
216 <action android:name="android.intent.action.ATTACH_DATA" />
217
218 <category android:name="android.intent.category.DEFAULT" />
219
220 <data android:mimeType="image/*" />
221 </intent-filter>
222 </activity>
223 <activity
224 android:name=".ui.ShareViaAccountActivity"
225 android:label="@string/title_activity_share_via_account"
226 android:launchMode="singleTop"
227 android:exported="true" />
228 <activity
229 android:name=".ui.EditAccountActivity"
230 android:launchMode="singleTop"
231 android:exported="true"
232 android:windowSoftInputMode="stateHidden|adjustResize" />
233 <activity
234 android:name=".ui.ConferenceDetailsActivity"
235 android:label="@string/action_muc_details"
236 android:exported="true"
237 android:windowSoftInputMode="stateHidden" />
238 <activity
239 android:name=".ui.ContactDetailsActivity"
240 android:exported="true"
241 android:windowSoftInputMode="stateHidden" />
242 <activity
243 android:name=".ui.PublishProfilePictureActivity"
244 android:label="@string/mgmt_account_publish_avatar"
245 android:exported="true"
246 android:windowSoftInputMode="stateHidden" />
247 <activity
248 android:name=".ui.PublishGroupChatProfilePictureActivity"
249 android:exported="true"
250 android:label="@string/group_chat_avatar" />
251 <activity
252 android:name=".ui.ShareWithActivity"
253 android:label="@string/app_name"
254 android:launchMode="singleTop"
255 android:exported="true">
256 <intent-filter>
257 <action android:name="android.intent.action.SEND" />
258 <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260 <category android:name="android.intent.category.DEFAULT" />
261
262 <data android:mimeType="text/plain" />
263 </intent-filter>
264 <intent-filter>
265 <action android:name="android.intent.action.SEND" />
266 <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268 <category android:name="android.intent.category.DEFAULT" />
269
270 <data android:mimeType="*/*" />
271 </intent-filter>
272
273 <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274 <meta-data
275 android:name="android.service.chooser.chooser_target_service"
276 android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277 </activity>
278 <activity
279 android:name=".ui.TrustKeysActivity"
280 android:label="@string/trust_omemo_fingerprints"
281 android:exported="true"
282 android:windowSoftInputMode="stateAlwaysHidden" />
283 <activity
284 android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285 android:exported="true"
286 android:theme="@style/Base.Theme.AppCompat" />
287 <activity android:name=".ui.MemorizingActivity"
288 android:exported="true" />
289 <activity
290 android:name=".ui.MediaBrowserActivity"
291 android:exported="true"
292 android:label="@string/media_browser" />
293
294 <service android:name=".services.ExportBackupService" android:exported="true"/>
295 <service android:name=".services.ImportBackupService" android:exported="true"/>
296 <service
297 android:name=".services.ContactChooserTargetService"
298 android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299 android:exported="true">
300 <intent-filter>
301 <action android:name="android.service.chooser.ChooserTargetService" />
302 </intent-filter>
303 </service>
304 <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306 <provider
307 android:name="androidx.core.content.FileProvider"
308 android:authorities="${applicationId}.files"
309 android:exported="false"
310 android:grantUriPermissions="true">
311 <meta-data
312 android:name="android.support.FILE_PROVIDER_PATHS"
313 android:resource="@xml/file_paths" />
314 </provider>
315 <provider
316 android:name=".services.BarcodeProvider"
317 android:authorities="${applicationId}.barcodes"
318 android:exported="false"
319 android:grantUriPermissions="true" />
320
321 <activity
322 android:name=".ui.ShortcutActivity"
323 android:label="@string/contact"
324 android:exported="true">
325 <intent-filter>
326 <action android:name="android.intent.action.CREATE_SHORTCUT" />
327 </intent-filter>
328 </activity>
329 <activity
330 android:name=".ui.MucUsersActivity"
331 android:exported="true"
332 android:label="@string/group_chat_members" />
333 <activity
334 android:name=".ui.ChannelDiscoveryActivity"
335 android:exported="true"
336 android:label="@string/discover_channels" />
337 <activity
338 android:name=".ui.RtpSessionActivity"
339 android:autoRemoveFromRecents="true"
340 android:exported="true"
341 android:launchMode="singleInstance"
342 android:supportsPictureInPicture="true" />
343 </application>
344
345</manifest>
346<?xml version="1.0" encoding="utf-8"?>
347<manifest xmlns:android="http://schemas.android.com/apk/res/android"
348 xmlns:tools="http://schemas.android.com/tools"
349 package="eu.siacs.conversations">
350
351 <application tools:ignore="GoogleAppIndexingWarning">
352 <activity
353 android:name=".ui.ManageAccountActivity"
354 android:label="@string/title_activity_manage_accounts"
355 android:launchMode="singleTask"
356 android:exported="true"/>
357 <activity
358 android:name=".ui.MagicCreateActivity"
359 android:label="@string/create_new_account"
360 android:launchMode="singleTask"
361 android:exported="true"/>
362 <activity
363 android:name=".ui.EasyOnboardingInviteActivity"
364 android:label="@string/invite_to_app"
365 android:launchMode="singleTask" />
366 <activity
367 android:name=".ui.ImportBackupActivity"
368 android:label="@string/restore_backup"
369 android:launchMode="singleTask"
370 android:exported="true">
371 <intent-filter>
372 <action android:name="android.intent.action.VIEW" />
373 <category android:name="android.intent.category.DEFAULT" />
374
375 <data android:mimeType="application/vnd.conversations.backup" />
376 <data android:scheme="content" />
377 </intent-filter>
378 <intent-filter>
379 <action android:name="android.intent.action.VIEW" />
380 <category android:name="android.intent.category.DEFAULT" />
381
382 <data android:mimeType="application/vnd.conversations.backup" />
383 <data android:scheme="file" />
384 </intent-filter>
385 <intent-filter>
386 <action android:name="android.intent.action.VIEW" />
387
388 <category android:name="android.intent.category.DEFAULT" />
389 <category android:name="android.intent.category.BROWSABLE" />
390
391 <data android:scheme="content" />
392 <data android:host="*" />
393 <data android:mimeType="*/*" />
394 <data android:pathPattern=".*\\.ceb" />
395 <data android:pathPattern=".*\\..*\\.ceb" />
396 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
397 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
398 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
399 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
400 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
401 </intent-filter>
402 <intent-filter>
403 <action android:name="android.intent.action.VIEW" />
404
405 <category android:name="android.intent.category.DEFAULT" />
406 <category android:name="android.intent.category.BROWSABLE" />
407
408 <data android:scheme="file" />
409 <data android:host="*" />
410 <data android:mimeType="*/*" />
411 <data android:pathPattern=".*\\.ceb" />
412 <data android:pathPattern=".*\\..*\\.ceb" />
413 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
414 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
415 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
416 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
417 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
418 </intent-filter>
419 </activity>
420 </application>
421</manifest>
422
423
My gradle file:
1<?xml version="1.0" encoding="utf-8"?>
2<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 xmlns:tools="http://schemas.android.com/tools"
4 package="eu.siacs.conversations">
5
6 <uses-sdk tools:overrideLibrary="net.ypresto.androidtranscoder" />
7
8 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
9 <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
10 <uses-permission android:name="android.permission.READ_CONTACTS" />
11 <uses-permission android:name="android.permission.READ_PROFILE" />
12 <uses-permission
13 android:name="android.permission.READ_PHONE_STATE"
14 android:maxSdkVersion="22" />
15 <uses-permission android:name="android.permission.INTERNET" />
16 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
17 <uses-permission android:name="android.permission.WAKE_LOCK" />
18 <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
19 <uses-permission android:name="android.permission.VIBRATE" />
20 <uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
21 <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
22 <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
23 <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
24 <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
25 <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
26
27 <uses-feature
28 android:name="android.hardware.location"
29 android:required="false" />
30 <uses-feature
31 android:name="android.hardware.location.gps"
32 android:required="false" />
33 <uses-feature
34 android:name="android.hardware.location.network"
35 android:required="false" />
36
37 <uses-permission android:name="android.permission.CAMERA" />
38 <uses-permission android:name="android.permission.RECORD_AUDIO" />
39 <uses-permission android:name="android.permission.BLUETOOTH" />
40 <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
41 <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
42 <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
43
44 <uses-feature
45 android:name="android.hardware.camera"
46 android:required="false" />
47 <uses-feature
48 android:name="android.hardware.camera.autofocus"
49 android:required="false" />
50 <uses-feature
51 android:name="android.hardware.microphone"
52 android:required="false" />
53
54 <application
55 android:name=".Application"
56 android:allowBackup="false"
57 android:allowClearUserData="true"
58 android:appCategory="social"
59 android:hardwareAccelerated="true"
60 android:icon="@mipmap/ic_app_launch"
61 android:label="@string/app_name"
62 android:largeHeap="true"
63 android:networkSecurityConfig="@xml/network_security_configuration"
64 android:requestLegacyExternalStorage="true"
65 android:roundIcon="@mipmap/ic_app_launch_round"
66 android:theme="@style/ConversationsTheme"
67 android:usesCleartextTraffic="true"
68 android:windowSoftInputMode="adjustPan|adjustResize"
69 tools:replace="android:label"
70 tools:targetApi="q">
71 <activity
72 android:name=".ui.search.GroupSearchActivity"
73 android:exported="true" />
74 <activity
75 android:name=".ui.profileUpdating.FavouritesActivity"
76 android:exported="true" />
77 <activity
78 android:name=".ui.profileUpdating.NameActivity"
79 android:exported="true" />
80 <activity
81 android:name=".ui.CompulsoryUpdateActivity"
82 android:exported="true" />
83 <activity android:name=".ui.payments.doPayment.DoPaymentActivity"
84 android:exported="true" />
85 <activity android:name=".ui.individualList.IndividualListActivity"
86 android:exported="true" />
87 <activity android:name=".ui.payments.setPayment.SetPaymentActivity"
88 android:exported="true" />
89 <activity android:name=".ui.login.otpActivity.OTPActivity"
90 android:exported="true" />
91 <activity android:name=".ui.login.loginActivity.LoginActivity"
92 android:exported="true" />
93
94 <service android:name=".services.XmppConnectionService" android:exported="true" />
95
96 <receiver android:name=".services.EventReceiver"
97 android:exported="true">
98 <intent-filter>
99 <action android:name="android.intent.action.BOOT_COMPLETED" />
100 <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
101 <action android:name="android.intent.action.ACTION_SHUTDOWN" />
102 <action android:name="android.media.RINGER_MODE_CHANGED" />
103 </intent-filter>
104 </receiver>
105
106 <activity
107 android:name=".ui.ShareLocationActivity"
108 android:label="@string/title_activity_share_location"
109 android:exported="true"/>
110 <activity
111 android:name=".ui.SearchActivity"
112 android:label="@string/search_messages"
113 android:exported="true" />
114 <activity
115 android:name=".ui.RecordingActivity"
116 android:configChanges="orientation|screenSize"
117 android:theme="@style/ConversationsTheme.Dialog"
118 android:exported="true" />
119 <activity
120 android:name=".ui.ShowLocationActivity"
121 android:label="@string/title_activity_show_location"
122 android:exported="true" />
123 <activity
124 android:name=".ui.SplashActivity"
125 android:theme="@style/SplashTheme"
126 android:exported="true">
127 <intent-filter>
128 <action android:name="android.intent.action.MAIN" />
129
130 <category android:name="android.intent.category.LAUNCHER" />
131 </intent-filter>
132 </activity>
133 <activity
134 android:name=".ui.ConversationsActivity"
135 android:label="@string/app_name"
136 android:launchMode="singleTask"
137 android:minWidth="300dp"
138 android:minHeight="300dp"
139 android:exported="true"
140 android:windowSoftInputMode="stateHidden" />
141 <activity
142 android:name=".ui.ScanActivity"
143 android:screenOrientation="portrait"
144 android:exported="true"
145 android:theme="@style/ConversationsTheme.FullScreen"
146 android:windowSoftInputMode="stateAlwaysHidden" />
147 <activity
148 android:name=".ui.UriHandlerActivity"
149 android:label="@string/app_name"
150 android:exported="true">
151 <intent-filter>
152 <action android:name="android.intent.action.VIEW" />
153
154 <category android:name="android.intent.category.DEFAULT" />
155 <category android:name="android.intent.category.BROWSABLE" />
156
157 <data android:scheme="xmpp" />
158 </intent-filter>
159 <intent-filter android:autoVerify="true">
160 <action android:name="android.intent.action.VIEW" />
161
162 <category android:name="android.intent.category.DEFAULT" />
163 <category android:name="android.intent.category.BROWSABLE" />
164
165 <data android:scheme="https" />
166 <data android:host="im.app.in" />
167 <data android:pathPrefix="/i/" />
168 <data android:pathPrefix="/j/" />
169 </intent-filter>
170 <intent-filter>
171 <action android:name="android.intent.action.SENDTO" />
172
173 <category android:name="android.intent.category.DEFAULT" />
174
175 <data android:scheme="imto" />
176 <data android:host="jabber" />
177 </intent-filter>
178 </activity>
179 <activity
180 android:name=".ui.StartConversationActivity"
181 android:label="@string/title_activity_start_conversation"
182 android:launchMode="singleTop"
183 android:exported="true">
184 <intent-filter>
185 <action android:name="android.intent.action.VIEW" />
186 </intent-filter>
187 </activity>
188 <activity
189 android:name=".ui.SettingsActivity"
190 android:label="@string/title_activity_settings"
191 android:exported="true">
192 <intent-filter>
193 <action android:name="android.intent.action.MAIN" />
194
195 <category android:name="android.intent.category.NOTIFICATION_PREFERENCES" />
196 </intent-filter>
197 </activity>
198 <activity
199 android:name=".ui.ChooseContactActivity"
200 android:label="@string/title_activity_choose_contact"
201 android:exported="true" />
202 <activity
203 android:name=".ui.BlocklistActivity"
204 android:label="@string/title_activity_block_list"
205 android:exported="true"/>
206 <activity
207 android:name=".ui.ChangePasswordActivity"
208 android:label="@string/change_password_on_server"
209 android:exported="true"/>
210 <activity
211 android:name=".ui.ChooseAccountForProfilePictureActivity"
212 android:enabled="false"
213 android:label="@string/choose_account"
214 android:exported="true">
215 <intent-filter android:label="@string/set_profile_picture">
216 <action android:name="android.intent.action.ATTACH_DATA" />
217
218 <category android:name="android.intent.category.DEFAULT" />
219
220 <data android:mimeType="image/*" />
221 </intent-filter>
222 </activity>
223 <activity
224 android:name=".ui.ShareViaAccountActivity"
225 android:label="@string/title_activity_share_via_account"
226 android:launchMode="singleTop"
227 android:exported="true" />
228 <activity
229 android:name=".ui.EditAccountActivity"
230 android:launchMode="singleTop"
231 android:exported="true"
232 android:windowSoftInputMode="stateHidden|adjustResize" />
233 <activity
234 android:name=".ui.ConferenceDetailsActivity"
235 android:label="@string/action_muc_details"
236 android:exported="true"
237 android:windowSoftInputMode="stateHidden" />
238 <activity
239 android:name=".ui.ContactDetailsActivity"
240 android:exported="true"
241 android:windowSoftInputMode="stateHidden" />
242 <activity
243 android:name=".ui.PublishProfilePictureActivity"
244 android:label="@string/mgmt_account_publish_avatar"
245 android:exported="true"
246 android:windowSoftInputMode="stateHidden" />
247 <activity
248 android:name=".ui.PublishGroupChatProfilePictureActivity"
249 android:exported="true"
250 android:label="@string/group_chat_avatar" />
251 <activity
252 android:name=".ui.ShareWithActivity"
253 android:label="@string/app_name"
254 android:launchMode="singleTop"
255 android:exported="true">
256 <intent-filter>
257 <action android:name="android.intent.action.SEND" />
258 <action android:name="android.intent.action.SEND_MULTIPLE" />
259
260 <category android:name="android.intent.category.DEFAULT" />
261
262 <data android:mimeType="text/plain" />
263 </intent-filter>
264 <intent-filter>
265 <action android:name="android.intent.action.SEND" />
266 <action android:name="android.intent.action.SEND_MULTIPLE" />
267
268 <category android:name="android.intent.category.DEFAULT" />
269
270 <data android:mimeType="*/*" />
271 </intent-filter>
272
273 <!-- the value here needs to be the full class name; independent of the configured applicationId -->
274 <meta-data
275 android:name="android.service.chooser.chooser_target_service"
276 android:value="eu.siacs.conversations.services.ContactChooserTargetService" />
277 </activity>
278 <activity
279 android:name=".ui.TrustKeysActivity"
280 android:label="@string/trust_omemo_fingerprints"
281 android:exported="true"
282 android:windowSoftInputMode="stateAlwaysHidden" />
283 <activity
284 android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
285 android:exported="true"
286 android:theme="@style/Base.Theme.AppCompat" />
287 <activity android:name=".ui.MemorizingActivity"
288 android:exported="true" />
289 <activity
290 android:name=".ui.MediaBrowserActivity"
291 android:exported="true"
292 android:label="@string/media_browser" />
293
294 <service android:name=".services.ExportBackupService" android:exported="true"/>
295 <service android:name=".services.ImportBackupService" android:exported="true"/>
296 <service
297 android:name=".services.ContactChooserTargetService"
298 android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE"
299 android:exported="true">
300 <intent-filter>
301 <action android:name="android.service.chooser.ChooserTargetService" />
302 </intent-filter>
303 </service>
304 <service android:name=".services.CompulsoryUpdateService" android:exported="true"/>
305
306 <provider
307 android:name="androidx.core.content.FileProvider"
308 android:authorities="${applicationId}.files"
309 android:exported="false"
310 android:grantUriPermissions="true">
311 <meta-data
312 android:name="android.support.FILE_PROVIDER_PATHS"
313 android:resource="@xml/file_paths" />
314 </provider>
315 <provider
316 android:name=".services.BarcodeProvider"
317 android:authorities="${applicationId}.barcodes"
318 android:exported="false"
319 android:grantUriPermissions="true" />
320
321 <activity
322 android:name=".ui.ShortcutActivity"
323 android:label="@string/contact"
324 android:exported="true">
325 <intent-filter>
326 <action android:name="android.intent.action.CREATE_SHORTCUT" />
327 </intent-filter>
328 </activity>
329 <activity
330 android:name=".ui.MucUsersActivity"
331 android:exported="true"
332 android:label="@string/group_chat_members" />
333 <activity
334 android:name=".ui.ChannelDiscoveryActivity"
335 android:exported="true"
336 android:label="@string/discover_channels" />
337 <activity
338 android:name=".ui.RtpSessionActivity"
339 android:autoRemoveFromRecents="true"
340 android:exported="true"
341 android:launchMode="singleInstance"
342 android:supportsPictureInPicture="true" />
343 </application>
344
345</manifest>
346<?xml version="1.0" encoding="utf-8"?>
347<manifest xmlns:android="http://schemas.android.com/apk/res/android"
348 xmlns:tools="http://schemas.android.com/tools"
349 package="eu.siacs.conversations">
350
351 <application tools:ignore="GoogleAppIndexingWarning">
352 <activity
353 android:name=".ui.ManageAccountActivity"
354 android:label="@string/title_activity_manage_accounts"
355 android:launchMode="singleTask"
356 android:exported="true"/>
357 <activity
358 android:name=".ui.MagicCreateActivity"
359 android:label="@string/create_new_account"
360 android:launchMode="singleTask"
361 android:exported="true"/>
362 <activity
363 android:name=".ui.EasyOnboardingInviteActivity"
364 android:label="@string/invite_to_app"
365 android:launchMode="singleTask" />
366 <activity
367 android:name=".ui.ImportBackupActivity"
368 android:label="@string/restore_backup"
369 android:launchMode="singleTask"
370 android:exported="true">
371 <intent-filter>
372 <action android:name="android.intent.action.VIEW" />
373 <category android:name="android.intent.category.DEFAULT" />
374
375 <data android:mimeType="application/vnd.conversations.backup" />
376 <data android:scheme="content" />
377 </intent-filter>
378 <intent-filter>
379 <action android:name="android.intent.action.VIEW" />
380 <category android:name="android.intent.category.DEFAULT" />
381
382 <data android:mimeType="application/vnd.conversations.backup" />
383 <data android:scheme="file" />
384 </intent-filter>
385 <intent-filter>
386 <action android:name="android.intent.action.VIEW" />
387
388 <category android:name="android.intent.category.DEFAULT" />
389 <category android:name="android.intent.category.BROWSABLE" />
390
391 <data android:scheme="content" />
392 <data android:host="*" />
393 <data android:mimeType="*/*" />
394 <data android:pathPattern=".*\\.ceb" />
395 <data android:pathPattern=".*\\..*\\.ceb" />
396 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
397 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
398 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
399 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
400 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
401 </intent-filter>
402 <intent-filter>
403 <action android:name="android.intent.action.VIEW" />
404
405 <category android:name="android.intent.category.DEFAULT" />
406 <category android:name="android.intent.category.BROWSABLE" />
407
408 <data android:scheme="file" />
409 <data android:host="*" />
410 <data android:mimeType="*/*" />
411 <data android:pathPattern=".*\\.ceb" />
412 <data android:pathPattern=".*\\..*\\.ceb" />
413 <data android:pathPattern=".*\\..*\\..*\\.ceb" />
414 <data android:pathPattern=".*\\..*\\..*\\..*\\.ceb" />
415 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.ceb" />
416 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
417 <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.ceb" />
418 </intent-filter>
419 </activity>
420 </application>
421</manifest>
422
423import com.android.build.OutputFile
424
425// Top-level build file where you can add configuration options common to all
426// sub-projects/modules.
427buildscript {
428 ext.kotlin_version = "1.5.21"
429 repositories {
430 google()
431 mavenCentral()
432 maven { url 'https://jitpack.io' }
433 gradlePluginPortal()
434 }
435 dependencies {
436 classpath 'com.android.tools.build:gradle:4.2.2'
437 classpath 'com.google.gms:google-services:4.3.8'
438 classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
439 }
440}
441
442apply plugin: 'com.android.application'
443apply plugin: 'kotlin-android'
444apply plugin: 'kotlin-kapt'
445apply plugin: 'com.google.gms.google-services'
446
447repositories {
448 google()
449 mavenCentral()
450 jcenter()
451 maven { url 'https://jitpack.io' }
452}
453
454configurations {
455 conversationsFreeCompatImplementation
456}
457
458dependencies {
459 implementation 'androidx.viewpager:viewpager:1.0.0'
460 implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
461
462 implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
463
464 implementation 'org.sufficientlysecure:openpgp-api:10.0'
465 implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
466 implementation 'androidx.appcompat:appcompat:1.3.1'
467 implementation 'androidx.exifinterface:exifinterface:1.3.2'
468 implementation 'androidx.cardview:cardview:1.0.0'
469 implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
470 implementation 'androidx.emoji:emoji:1.1.0'
471 implementation 'com.google.android.material:material:1.4.0'
472 conversationsFreeCompatImplementation 'androidx.emoji:emoji-bundled:1.1.0'
473 implementation 'org.bouncycastle:bcmail-jdk15on:1.64'
474 //zxing stopped supporting Java 7 so we have to stick with 3.3.3
475 //https://github.com/zxing/zxing/issues/1170
476 implementation 'com.google.zxing:core:3.4.1'
477 implementation 'de.measite.minidns:minidns-hla:0.2.4'
478 implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
479 implementation 'org.whispersystems:signal-protocol-java:2.8.1'
480 implementation 'com.makeramen:roundedimageview:2.3.0'
481 implementation "com.wefika:flowlayout:0.4.1"
482 implementation 'net.ypresto.androidtranscoder:android-transcoder:0.3.0'
483 implementation 'org.jxmpp:jxmpp-jid:1.0.1'
484 implementation 'org.osmdroid:osmdroid-android:6.1.10'
485 implementation 'org.hsluv:hsluv:0.2'
486 implementation 'org.conscrypt:conscrypt-android:2.5.2'
487 implementation 'me.drakeet.support:toastcompat:1.1.0'
488 implementation "com.leinardi.android:speed-dial:3.2.0"
489
490 implementation "com.squareup.retrofit2:retrofit:2.9.0"
491 implementation "com.squareup.retrofit2:converter-gson:2.9.0"
492 implementation "com.squareup.okhttp3:okhttp:5.0.0-alpha.2"
493 implementation 'com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.2'
494
495 implementation 'com.google.guava:guava:30.1.1-android'
496 implementation 'org.webrtc:google-webrtc:1.0.32006'
497
498 // Lifecycle Helper
499 implementation "androidx.activity:activity-ktx:1.3.0-rc02"
500 implementation "androidx.fragment:fragment-ktx:1.3.6"
501
502 //Navigation
503 implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
504 implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
505
506 //CardView
507 implementation "androidx.cardview:cardview:1.0.0"
508
509 //Country Code Picker
510 implementation 'com.hbb20:ccp:2.5.3'
511
512 //Firebase
513 implementation 'com.google.firebase:firebase-bom:28.3.0'
514 implementation 'com.google.firebase:firebase-auth-ktx:21.0.1'
515 implementation 'androidx.browser:browser:1.3.0'
516
517 //OTP view
518 implementation 'com.github.mukeshsolanki:android-otpview-pinview:2.1.2'
519
520 //Retrofit
521 implementation 'com.squareup.retrofit2:retrofit:2.9.0'
522 implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
523
524 //Gson
525 implementation 'com.google.code.gson:gson:2.8.7'
526
527 //Multidex
528 implementation 'androidx.multidex:multidex:2.0.1'
529
530 //Round Image
531 implementation 'de.hdodenhof:circleimageview:3.1.0'
532
533 // Button with image and text
534 implementation 'com.github.Omega-R:OmegaCenterIconButton:0.0.4@aar'
535
536 //Razor pay
537 implementation 'com.razorpay:checkout:1.6.10'
538
539 //Mixpanel Tracking
540 implementation 'com.mixpanel.android:mixpanel-android:5.9.1'
541
542 //Loading screen
543 implementation 'com.wang.avi:library:2.1.3'
544
545 //Loading
546 implementation 'com.wang.avi:library:2.1.3'
547
548 //Form
549 implementation 'com.quickbirdstudios:surveykit:1.1.0'
550}
551
552ext {
553 travisBuild = System.getenv("TRAVIS") == "true"
554 preDexEnabled = System.getProperty("pre-dex", "true")
555 abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
556}
557
558android {
559 compileSdkVersion 31
560
561 defaultConfig {
562 minSdkVersion 24
563 targetSdkVersion 31
564 versionCode 44
565 versionName "2.0.4"
566 multiDexEnabled = true
567 archivesBaseName += "-$versionName"
568 applicationId "com.app.app"
569 resValue "string", "applicationId", applicationId
570 def appName = "app"
571 resValue "string", "app_name", appName
572 buildConfigField "String", "APP_NAME", "\"$appName\""
573 }
574
575 splits {
576 abi {
577 universalApk true
578 enable true
579 }
580 }
581
582 configurations {
583 compile.exclude group: 'org.jetbrains' , module:'annotations'
584 }
585
586 dataBinding {
587 enabled true
588 }
589
590 dexOptions {
591 // Skip pre-dexing when running on Travis CI or when disabled via -Dpre-dex=false.
592 preDexLibraries = preDexEnabled && !travisBuild
593 jumboMode true
594 }
595
596 compileOptions {
597 sourceCompatibility JavaVersion.VERSION_1_8
598 targetCompatibility JavaVersion.VERSION_1_8
599 }
600
601 flavorDimensions("mode", "distribution", "emoji")
602
603 productFlavors {
604
605 conversations {
606 dimension "mode"
607 }
608 free {
609 dimension "distribution"
610 versionNameSuffix "+f"
611 }
612 compat {
613 dimension "emoji"
614 versionNameSuffix "c"
615 }
616 }
617
618 sourceSets {
619 conversationsFreeCompat {
620 java {
621 srcDir 'src/freeCompat/java'
622 srcDir 'src/conversationsFree/java'
623 }
624 }
625 }
626
627 buildTypes {
628 release {
629 shrinkResources true
630 minifyEnabled true
631 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
632 versionNameSuffix "r"
633 }
634 debug {
635 shrinkResources true
636 minifyEnabled true
637 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
638 versionNameSuffix "d"
639 }
640 }
641
642
643 if (new File("signing.properties").exists()) {
644 Properties props = new Properties()
645 props.load(new FileInputStream(file("signing.properties")))
646
647 signingConfigs {
648 release {
649 storeFile file(props['keystore'])
650 storePassword props['keystore.password']
651 keyAlias props['keystore.alias']
652 keyPassword props['keystore.password']
653 }
654 }
655 buildTypes.release.signingConfig = signingConfigs.release
656 }
657
658 lintOptions {
659 disable 'MissingTranslation', 'InvalidPackage','AppCompatResource'
660 }
661
662 subprojects {
663
664 afterEvaluate {
665 if (getPlugins().hasPlugin('android') ||
666 getPlugins().hasPlugin('android-library')) {
667
668 configure(android.lintOptions) {
669 disable 'AndroidGradlePluginVersion', 'MissingTranslation'
670 }
671 }
672
673 }
674 }
675
676 packagingOptions {
677 exclude 'META-INF/BCKEY.DSA'
678 exclude 'META-INF/BCKEY.SF'
679 }
680
681 android.applicationVariants.all { variant ->
682 variant.outputs.each { output ->
683 def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
684 if (baseAbiVersionCode != null) {
685 output.versionCodeOverride = (100 * variant.versionCode) + baseAbiVersionCode
686 }
687 }
688
689 }
690}
691
ANSWER
Answered 2021-Aug-04 at 09:18I'm not sure what you're using to code, but in order to set it in Android Studio, open the manifest of your project and under the "activity" section, put android:exported="true"(or false if that is what you prefer). I have attached an example.
QUESTION
App Engine Python 2.7 - ImportError: cannot import name apiproxy
Asked 2022-Feb-08 at 08:52With the upgrade to Google Cloud SDK 360.0.0-0 i started seeing the following error when running the dev_appserver.py
command for my Python 2.7 App Engine project.
1 File "/home/..................py", line 6, in <module>
2 from google.appengine.ext import ndb
3 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/__init__.py", line 22, in <module>
4 from tasklets import *
5 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/tasklets.py", line 85, in <module>
6 from .google_imports import apiproxy_stub_map
7 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/google_imports.py", line 44, in <module>
8 from google.appengine.runtime import apiproxy as callback
9ImportError: cannot import name apiproxy
10
gcloud version
1 File "/home/..................py", line 6, in <module>
2 from google.appengine.ext import ndb
3 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/__init__.py", line 22, in <module>
4 from tasklets import *
5 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/tasklets.py", line 85, in <module>
6 from .google_imports import apiproxy_stub_map
7 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/google_imports.py", line 44, in <module>
8 from google.appengine.runtime import apiproxy as callback
9ImportError: cannot import name apiproxy
10Google Cloud SDK 360.0.0
11alpha 2021.10.04
12app-engine-python 1.9.95
13app-engine-python-extras 1.9.95
14beta 2021.10.04
15bq 2.0.71
16cloud-build-local 0.5.2
17cloud-datastore-emulator 2.1.0
18core 2021.10.04
19gsutil 5.3
20
ANSWER
Answered 2022-Feb-08 at 08:52This issue seems to have been resolved with Google Cloud SDK version 371
On my debian based system i fixed it by downgrading the app-engine-python
component to the previous version
1 File "/home/..................py", line 6, in <module>
2 from google.appengine.ext import ndb
3 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/__init__.py", line 22, in <module>
4 from tasklets import *
5 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/tasklets.py", line 85, in <module>
6 from .google_imports import apiproxy_stub_map
7 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/google_imports.py", line 44, in <module>
8 from google.appengine.runtime import apiproxy as callback
9ImportError: cannot import name apiproxy
10Google Cloud SDK 360.0.0
11alpha 2021.10.04
12app-engine-python 1.9.95
13app-engine-python-extras 1.9.95
14beta 2021.10.04
15bq 2.0.71
16cloud-build-local 0.5.2
17cloud-datastore-emulator 2.1.0
18core 2021.10.04
19gsutil 5.3
20sudo apt-get install google-cloud-sdk-app-engine-python=359.0.0-0
21sudo apt-get install google-cloud-sdk-app-engine-python-extras=359.0.0-0
22
gcloud version (after downgrade)
1 File "/home/..................py", line 6, in <module>
2 from google.appengine.ext import ndb
3 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/__init__.py", line 22, in <module>
4 from tasklets import *
5 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/tasklets.py", line 85, in <module>
6 from .google_imports import apiproxy_stub_map
7 File "/usr/lib/google-cloud-sdk/platform/google_appengine/python27/sdk/google/appengine/ext/ndb/google_imports.py", line 44, in <module>
8 from google.appengine.runtime import apiproxy as callback
9ImportError: cannot import name apiproxy
10Google Cloud SDK 360.0.0
11alpha 2021.10.04
12app-engine-python 1.9.95
13app-engine-python-extras 1.9.95
14beta 2021.10.04
15bq 2.0.71
16cloud-build-local 0.5.2
17cloud-datastore-emulator 2.1.0
18core 2021.10.04
19gsutil 5.3
20sudo apt-get install google-cloud-sdk-app-engine-python=359.0.0-0
21sudo apt-get install google-cloud-sdk-app-engine-python-extras=359.0.0-0
22Google Cloud SDK 360.0.0
23alpha 2021.10.04
24app-engine-python 1.9.94
25app-engine-python-extras 1.9.95
26beta 2021.10.04
27bq 2.0.71
28cloud-build-local 0.5.2
29cloud-datastore-emulator 2.1.0
30core 2021.10.04
31gsutil 5.3
32
I created an issue for this bug: https://issuetracker.google.com/issues/202171426
QUESTION
Log4j vulnerability - Is Log4j 1.2.17 vulnerable (was unable to find any JNDI code in source)?
Asked 2022-Feb-01 at 15:47With regard to the Log4j JNDI remote code execution vulnerability that has been identified CVE-2021-44228 - (also see references) - I wondered if Log4j-v1.2 is also impacted, but the closest I got from source code review is the JMS-Appender.
The question is, while the posts on the Internet indicate that Log4j 1.2 is also vulnerable, I am not able to find the relevant source code for it.
Am I missing something that others have identified?
Log4j 1.2 appears to have a vulnerability in the socket-server class, but my understanding is that it needs to be enabled in the first place for it to be applicable and hence is not a passive threat unlike the JNDI-lookup vulnerability which the one identified appears to be.
Is my understanding - that Log4j v1.2 - is not vulnerable to the jndi-remote-code execution bug correct?
ReferencesThis blog post from Cloudflare also indicates the same point as from AKX....that it was introduced from Log4j 2!
Update #1 - A fork of the (now-retired) apache-log4j-1.2.x with patch fixes for few vulnerabilities identified in the older library is now available (from the original log4j author). The site is https://reload4j.qos.ch/. As of 21-Jan-2022 version 1.2.18.2 has been released. Vulnerabilities addressed to date include those pertaining to JMSAppender, SocketServer and Chainsaw vulnerabilities. Note that I am simply relaying this information. Have not verified the fixes from my end. Please refer the link for additional details.
ANSWER
Answered 2022-Jan-01 at 18:43The JNDI feature was added into Log4j 2.0-beta9.
Log4j 1.x thus does not have the vulnerable code.
QUESTION
My project doesn't compile with optimization parameters after upgrading from angular 11 to angular 12
Asked 2022-Jan-31 at 19:50I just upgraded an environment with nrwl from angular version 11 to 12 with two angular applications and several libraries. After update when I try to compile using optimization settings:
angular.json
1{
2 ....
3 "optimization": {
4 "scripts": true,
5 "styles": {
6 "minify": true,
7 "inlineCritical": false
8 },
9 "fonts": true
10 },
11}
12
It gives me the following error (sass and scss component files):
1{
2 ....
3 "optimization": {
4 "scripts": true,
5 "styles": {
6 "minify": true,
7 "inlineCritical": false
8 },
9 "fonts": true
10 },
11}
12/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass - Error: /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass from Css Minimizer
13Error: Transform failed with 1 error:
14error: Invalid version: "15.2-15.3"
15 at failureErrorWithLog (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1493:15)
16 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1282:29
17 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:629:9
18 at handleIncomingPacket (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:726:9)
19 at Socket.readFromStdout (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:596:7)
20 at Socket.emit (events.js:315:20)
21 at addChunk (_stream_readable.js:309:12)
22 at readableAddChunk (_stream_readable.js:284:9)
23 at Socket.Readable.push (_stream_readable.js:223:10)
24 at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
25
Disabling styles.minify and fonts compiles without problems:
1{
2 ....
3 "optimization": {
4 "scripts": true,
5 "styles": {
6 "minify": true,
7 "inlineCritical": false
8 },
9 "fonts": true
10 },
11}
12/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass - Error: /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass from Css Minimizer
13Error: Transform failed with 1 error:
14error: Invalid version: "15.2-15.3"
15 at failureErrorWithLog (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1493:15)
16 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1282:29
17 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:629:9
18 at handleIncomingPacket (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:726:9)
19 at Socket.readFromStdout (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:596:7)
20 at Socket.emit (events.js:315:20)
21 at addChunk (_stream_readable.js:309:12)
22 at readableAddChunk (_stream_readable.js:284:9)
23 at Socket.Readable.push (_stream_readable.js:223:10)
24 at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
25"optimization": {
26 "scripts": true,
27 "styles": {
28 "minify": false,
29 "inlineCritical": false
30 },
31 "fonts": false
32 },
33}
34
ANSWER
Answered 2022-Jan-31 at 19:50Reason of the issue
It is expected browserslist to return an entry for each version ("safari 15.2", "safari 15.3") instead of a range ("safari 15.2-15.3"). So, this is just a bug in the parsing logic of Safari browser versions which needs to be corrected and will be done soon in fixed versions of Angular 12/Angular 13. Link to details is here.
IMPORTANT UPDATE:
This is fixed in v12.2.16 and v13.2.1, please update if you are experiencing this issue. Users on v11 shouldn't be affected. Link to details is here. If you can not/do not want to update for any reason, then one of the workarounds below can be used.
Workarounds:
Modify .browserslistrc
Add to .browserslistrc such lines:
1{
2 ....
3 "optimization": {
4 "scripts": true,
5 "styles": {
6 "minify": true,
7 "inlineCritical": false
8 },
9 "fonts": true
10 },
11}
12/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass - Error: /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass from Css Minimizer
13Error: Transform failed with 1 error:
14error: Invalid version: "15.2-15.3"
15 at failureErrorWithLog (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1493:15)
16 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1282:29
17 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:629:9
18 at handleIncomingPacket (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:726:9)
19 at Socket.readFromStdout (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:596:7)
20 at Socket.emit (events.js:315:20)
21 at addChunk (_stream_readable.js:309:12)
22 at readableAddChunk (_stream_readable.js:284:9)
23 at Socket.Readable.push (_stream_readable.js:223:10)
24 at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
25"optimization": {
26 "scripts": true,
27 "styles": {
28 "minify": false,
29 "inlineCritical": false
30 },
31 "fonts": false
32 },
33}
34not ios_saf 15.2-15.3 # temporary solution to avoid build issues https://github.com/nrwl/nx/issues/8768
35not safari 15.2-15.3 # temporary solution to avoid build issues https://github.com/nrwl/nx/issues/8768
36
It has to come AFTER any mentions of ios_saf or safari. Otherwise, it doesn't work. Link to workaround is here.
Erase content of .browserslistrc
Erasing content of .browserslistrc helps to fix builds. Link to workaround is here.
Delete .browserslistrc
Deletion of .browserslistrc helps to fix builds. Link to workaround is here.
Install caniuse-lite
Add caniuse-lite package:
1{
2 ....
3 "optimization": {
4 "scripts": true,
5 "styles": {
6 "minify": true,
7 "inlineCritical": false
8 },
9 "fonts": true
10 },
11}
12/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass - Error: /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/libs/ui-share-components/src/lib/top-panel/top-panel/top-panel.component.sass from Css Minimizer
13Error: Transform failed with 1 error:
14error: Invalid version: "15.2-15.3"
15 at failureErrorWithLog (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1493:15)
16 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:1282:29
17 at /home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:629:9
18 at handleIncomingPacket (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:726:9)
19 at Socket.readFromStdout (/home/jose/WORK/Rental/REAL/APPS/angular-nx-ws/node_modules/@angular-devkit/build-angular/node_modules/esbuild/lib/main.js:596:7)
20 at Socket.emit (events.js:315:20)
21 at addChunk (_stream_readable.js:309:12)
22 at readableAddChunk (_stream_readable.js:284:9)
23 at Socket.Readable.push (_stream_readable.js:223:10)
24 at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)
25"optimization": {
26 "scripts": true,
27 "styles": {
28 "minify": false,
29 "inlineCritical": false
30 },
31 "fonts": false
32 },
33}
34not ios_saf 15.2-15.3 # temporary solution to avoid build issues https://github.com/nrwl/nx/issues/8768
35not safari 15.2-15.3 # temporary solution to avoid build issues https://github.com/nrwl/nx/issues/8768
36npm install caniuse-lite@1.0.30001303 --save-dev --save-exact
37
Link to workaround is here.
QUESTION
How to set max-height of dropdown selection area?
Asked 2022-Jan-21 at 05:26In vuejs2 app having select input with rather big options list it breaks design of my page on extra small devices. Searching in net I found “size” property, but that not what I I need : I want to have dropdown selection, which is the default. Are there some other decision, maybe with CSS to set max-height of dropdown selection area.
Modeified PART # 1: I made testing demo page at http://photographers.my-demo-apps.tk/sel_test it has 2 select inputs with custom design and events as in this example link How to Set Height for the Drop Down of Select box and following workaround at js fiddle:
1select{
2 color: red;
3}
1select{
2 color: red;
3}<select onfocus='this.size=10;' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
4 <option>1</option>
5 <option>2</option>
6 <option>3</option>
7 <option>4</option>
8 <option>5</option>
9 <option>6</option>
10 <option>7</option>
11 <option>8</option>
12 <option>9</option>
13 <option>10</option>
14 <option>11</option>
15 <option>12</option>
16 <option>13</option>
17 <option>14</option>
18 <option>15</option>
19 <option>16</option>
20 <option>17</option>
21 <option>18</option>
22 <option>19</option>
23 <option>20</option>
24 <option>21</option>
25</select>
26<div>Popular Tags:</div>
are applied to the second select input and it does not look/work properly. I suppose it conflicts somehow with current desing. Can it be fixed somehow?
as that is vuejs2 page I know that there are some select components at https://github.com/vuejs/awesome-vue#select and I used some of them, like vue-select but I need to keep custom design so I try to use original select input...
Modified PART # 2 : I added 2 classes definitions :
1select{
2 color: red;
3}<select onfocus='this.size=10;' onblur='this.size=1;' onchange='this.size=1; this.blur();'>
4 <option>1</option>
5 <option>2</option>
6 <option>3</option>
7 <option>4</option>
8 <option>5</option>
9 <option>6</option>
10 <option>7</option>
11 <option>8</option>
12 <option>9</option>
13 <option>10</option>
14 <option>11</option>
15 <option>12</option>
16 <option>13</option>
17 <option>14</option>
18 <option>15</option>
19 <option>16</option>
20 <option>17</option>
21 <option>18</option>
22 <option>19</option>
23 <option>20</option>
24 <option>21</option>
25</select>
26<div>Popular Tags:</div>.select-wrapper {
27 height: 50px !important;
28 overflow-y: visible !important;
29 background-color: yellow !important;
30}
31
32.select {
33 width: 100% !important;
34 /* make it min-height*/
35 min-height: 50px !important;
36 border-radius: 25px !important;
37 border-color: #555 !important;
38 padding: 10px !important;
39 border:2px dotted red !important;
40}
41
Also I set background-color and border to these classes to be sure that these classes are applied and !important to all properties. But it did not help. Could you please to take a look!
Thank you!
ANSWER
Answered 2022-Jan-15 at 16:00Unfortunately, you cannot chant the height of a dropdown list (while using <select>
).
It is confirmed here.
you can build it yourself using div
s & v-for
(assuming you get the list from an outsource) and then you can style it as you wish.
apologies for barring bad news.
Community Discussions contain sources that include Stack Exchange Network
Tutorials and Learning Resources in Apps
Tutorials and Learning Resources are not available at this moment for Apps