Unable to view API response in Charles web proxy(4.6.1) when connected to Android app running in Samsung tabA7 - charles-proxy

I have installed charles proxy Certificate on Android Samsung tabA7.
Followed the steps:https://community.tealiumiq.com/t5/Tealium-for-Android/Setting-up-Charles-to-Proxy-your-Android-Device/ta-p/5121
When i launch the app on device, Charles Web proxy display the API responses as Unknown Kindly let me know how to resolve this issue and view the actual response.

If you have created the app you need to modify the manifest of Android app otherwise it won't work as Applications don't allow it by default.
Refer Charles documentation: https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
Android:
As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.
Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
Then add a reference to this file in your app's manifest, as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="#xml/network_security_config" ... >
...
</application>
</manifest>

Related

Flutter Crypto App working with full functionality on Emulator & physical device but after rolling out to app store many functionalities are missing

I have built a Crypto App with API from https://api.coingecko.com/api/...
This App works fine when on Emulator or Physical Device but after it is rolled out for production in Play Store, many functionalities are missing from the App (the whole API).
Play Store link : com.codoweb.cryptorealtime
Here are some snapshots for your better understanding -
What do I do ? Please help.
I belive you missed to add internet permission in the manifest
<manifest xlmns:android...>
...
<uses-permission android:name="android.permission.INTERNET" />
<application ...
</manifest>

Flutter app doesn't have internet permission in APK file

My APK build file in flutter doesn't have internet permission.
I already did this
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.Supplier_app">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
This is a very general issue faced by flutter beginners.
In android, each required permission is specified in AndroidManifest.xml file.
For native coding there is only one file inside app/src/main. For flutter, there are not one but 3 of these.
app/src/debug/AndroidManifest.xml - for debug mode
app/src/main/AndroidManifest.xml- for app distribution in release mode
app/src/profile/AndroidManifest.xml - for running app in profile mode
The internet permission is provided by default in the debug mode. So, internet works without doing anything.
All the permissions required for app distribution must be specified in app/src/main/AndroidManifest.xml. For testing purpose, the permissions are specified in other files mentioned.
Please check the mode of the app in which you have permission. It should be in main/AndroidManifest.
You are probably trying to edit the AndroidManifest.xml that is located inside the "debug" directory. The AndroidManifest.xml you are looking for is located in the app\src\main path.

How to create Android app links using branch.io in Ionic 2/3 app?

I'm having a bit of difficulty understanding the implementation of some of the branch concepts for the Ionic platform Wrapper SDK .
I've generated short URLs using the SDK, but it seems to get redirected in the browser before the app is launched. Link -> Browser -> App handoff.
How do I avoid this redirection? I've enabled Android app link, added SHA 256 of certs and added all configs in config.xml as per SDK docs.
Is it possible to generate long links as using the "/a/ and the Branch Key" as in https://bnc.lt/a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Something like branchcordova://a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F
Looks like a configuration issue. Have you added your Link Domain on the config.xml file? You can find your Link Domain on the Link Settings page.
<!-- sample config.xml -->
<widget id="com.eneff.branch.cordovatestbed"
version="0.0.1" xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- Branch -->
<plugin name="branch-cordova-sdk" spec="^2.5.0" />
<branch-config>
<branch-key value="<YOUR LIVE KEY>" />
<uri-scheme value="<YOUR URI SCHEME>" />
<link-domain value="<YOUR LINK DOMAIN>" />
<ios-team-release value="<YOUR TEAM ID>" />
</branch-config>
Long links can only be generated using your Link Domain.
Something like branchcordova://a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F is incorrect.
Someting like https://example.app.link/fzmLEhobLD?foo=bar&baz=456&$fallback_url=https%3A%2F%2Fbranch.io%2F is correct.
You should use https://link.example.com if you have a custom link domain configured.
More info on Long Links- https://docs.branch.io/pages/links/integrate/#long-links
If we use the Android app link (URI scheme), then the app would be open directly. But, it would be detected as a non-branch link and we might not get any analytics data or branch.io related features.
The redirection of short and long URLs seems to depend on the app which is opening the link. Some apps like Hangout app do the redirect thing.
If we are to open a branch link from inside our app, we could do the following to somehow skip the redirection.
const longLink = https://bnc.lt/a/key_live_kaFuWw8WvY7yn1d9yYiP8gokwqjV0Swt?foo=bar&baz=456;
window.open(longLink, '_system');

CharlesProxy SSL Handshake failure on Android Nougat

I am trying to proxy my phone running Android 7.1.2, to look at the gets and posts made through an app I'm working with. Using CharlesProxy 4.1.4, this is easily possible for iOS devices. However, the app functions differently on Android, and we want to know how.
I have configured my device to connect to Charles by entering the IP and Port, followed by navigating to chls.pro/ssl to get the CA certificate. Even on chrome, the certificate downloaded and installed without fault. I can see calls coming into Charles, but I cannot see any content of the call. Instead, it is listed as <unknown> stating SSLHandshake: Received fatal alert: certificate_unknown.
Is there another way I can actually trust this certificate? Or is there another way to successfully allow SSL with Android? Again, all of my settings work fine with iOS devices, so I do not need examples for that OS.
Thanks
As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.
In order to configure your app to trust Charles, you need to add a Network Security Configuration File to your app. This file can override the system default, enabling your app to trust user installed CA certificates (e.g. the Charles Root Certificate). You can specify that this only applies in debug builds of your application, so that production builds use the default trust profile.
Add a file res/xml/network_security_config.xml to your app:
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>
Then add a reference to this file in your app's manifest, as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="#xml/network_security_config" ... >
...
</application>
</manifest>
Refer to: https://www.charlesproxy.com/documentation/using-charles/ssl-certificates/

Ionic app not makes http requests

I developed an app with Ionic v1 and tested with "ionic serve" and "ionic run android" and works fine. It makes all $http requests to an external API (that allows CORS) and I recive the data well.
The probleme comes when I try to test the app in real mode. I added the app to Ionic view to test in Android mobile device and I see that the requests to the API are not performed (because I not see any data printed in tha app).
For what reasons can be? I need to perform extra configs in my API server? I need to perform some special configs to Ionic app?
PD: I installed cordova withelist plugin and added this lines to config.xml file:
<access origin="*" />
<allow-navigation href="*" />
<allow-intent href="*" />
You verify if Cordova CLI has generated these Android permissions entries in your AndroidManifest.xml?
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
I hope that helps.
Greetings.