Added/Updated Android Network Knowledge, Test and Demo#3617
Conversation
…the guidelines, improvements here and there
|
@cpholguera Thanks for linking the issue. Should we make a new issue for this one? |
|
|
||
| If you develop native code using the [Android Native Development Kit (NDK)](https://developer.android.com/ndk), you will not have access to high level network libraries. | ||
|
|
||
| You, or any networking library you use, can still directly use POSIX sockets. However, @MASTG-KNOW-0014 will not apply automatically. |
There was a problem hiding this comment.
This is supported in Android by directly providing POSIX sockets. However, the restrictions of the @MASTG-KNOW-0014 like the prohibited use of clear text traffic will not apply automatically.
|
|
||
| You, or any networking library you use, can still directly use POSIX sockets. However, @MASTG-KNOW-0014 will not apply automatically. | ||
|
|
||
| Some applications, like games or streaming apps, require low latency network connections. Hence they often provide their own native network stack. |
There was a problem hiding this comment.
Move this sentence above the previous sentence.
| Schemes("stun", "stuns") | ||
| ) | ||
|
|
||
| schemes.forEach { scheme -> |
There was a problem hiding this comment.
This function looks a bit too long. Can you divide the tests into smaller functions, focusing on individual test cases?
|
|
||
| You, or any networking library you use, can still directly use POSIX sockets. However, @MASTG-KNOW-0014 will not apply automatically. | ||
|
|
||
| Some applications, like games or streaming apps, require low latency network connections. Hence they often provide their own native network stack. |
There was a problem hiding this comment.
I would move this sentence above the previous one
|
|
||
| If you develop native code using the [Android Native Development Kit (NDK)](https://developer.android.com/ndk), you will not have access to high level network libraries. | ||
|
|
||
| You, or any networking library you use, can still directly use POSIX sockets. However, @MASTG-KNOW-0014 will not apply automatically. |
There was a problem hiding this comment.
Android allows this by giving apps the possibility to directly use low level Java or POSIX sockets for networking. However in case of not using the high level Java/Kotlin networking APIs, @MASTG-KNOW-0014 will not be able to enforce limitations such as blocking clear text traffic.
| - Addresses, which are networking identifiers, like IP addresses. | ||
| - Sockets, which are basic bidirectional data communication mechanisms. | ||
| - Interfaces, which describe network interfaces. | ||
|
|
There was a problem hiding this comment.
I would somewhere mention the difference between URI and URL. It might not be widely known and is also a bit strange in the Android ecosystem.
A URL specifies the location of a resource on the internet, while a URI can be used to identify any type of resource, not just those on the internet. It can for example be also an app local resource or file.
|
|
||
| ## Native Code Networking | ||
|
|
||
| When developing native code using the Android NDK toolset, there are no libraries available by default which implement protocols above the transport layer. Instead, developers can use the POSIX API directly to initialize sockets. [NDK Networking API](https://developer.android.com/ndk/reference/group/networking) on the other hand provides additional functions for address lookups for example. |
There was a problem hiding this comment.
"available by default" meaning provided by Android? Afaik libs such as libcurl are available.
Description
Expanded on the Android Networking:
Follow up from #3030.
AI Tool Disclosure
kagi assistantClaude 4.5 Sonnet]Mostly to expand lists such as lists of insecure URI schemes. No AI for the text.