I am trying to display images in my flutter app. If I use a google link of the image, it is displayed. But, if I use my server URL, the image is not visible in the installed app.
I tried accessing the URL from both mobile and web browsers and it loads successfully there.
I have already used:
<manifest xmlns:android="...">
<uses-permission android:name="android.permission.INTERNET"/> <!-- Add this -->
</manifast>
Related
I'm using the Flutter Image Cropper plugin. The first time I build the app and try to crop an image, the app crashes when I click to save the cropped image. But if I rebuild the app, it works perfectly. I think this may be related to permissions as I had a very similar problem with audio record permissions. This was solved by using the Permissions Plugin to request all permissions at the top of the app.
The permissions I am requesting in my AndroidManifest.xml file are;
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.INTERNET"/>
I've also added this to the AndroidManifest.xml;
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
/>
Here's the method I'm using to check permissions at the top of my widget tree;
Map<Permission, PermissionState> permission = await PermissionsPlugin
.checkPermissions([
Permission.CAMERA,
Permission.RECORD_AUDIO,
Permission.WRITE_EXTERNAL_STORAGE,
Permission.READ_EXTERNAL_STORAGE,
]);
Although the Permissions Plugin managed to solve the crashing of my app upon first build, it doesn't seem to have helped with the Flutter Image Cropper plugin.
Can anyone see what's going on?
We were able to implement sharing to Instagram Stories, but not to Facebook Stories, following these instructions . Android is not able to find an app for the intent com.facebook.stories.ADD_TO_STORY, despite Facebook app being installed and updated. Has anybody been able to accomplish that?
It might be too late but i thought to answer it if it can help people who might be facing issues in sharing to instagram without Intent Chooser dialog.
Facebook expects us to launch an intent chooser dialog to select from 4 -5 activities within facebook app itself that can handle com.facebook.stories.ADD_TO_STORY as action.
Nevertheless here is the code i used to launch the exact story editor screen from facebook app. It uses ACTION_SEND instead of com.facebook.stories.ADD_TO_STORY.
So First define a fileprovider inside application tag in manifest
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="#xml/file_provider_paths" />
</provider>
Then keep file_provider_paths.xml inside xml folder in res directory.
file_provider_paths.xml
<paths>
<external-path
name="share"
path="/" />
</paths>
Then perpare a uri of file you want to share
File file = new File(imagePath);
Uri fileUri = FileProvider.getUriForFile(getApplicationContext(),getPackageName()+".fileprovider",file);
Then send intent to facebook as below
Intent storiesIntent = new Intent(Intent.ACTION_SEND);
storiesIntent.setComponent(new ComponentName("com.facebook.katana", "com.facebook.composer.shareintent.AddToStoryAlias"));
storiesIntent.setDataAndType(uri, "image/*");//for background image
storiesIntent.putExtra("interactive_asset_uri", uri);//for sticker assets
storiesIntent.putExtra("content_url", "https://dexati.com/");
grantUriPermission("com.facebook.katana", uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivityForResult(storiesIntent, 0);
Here we are making explicit call to the story editor activity of facebook app.
I integrated facebook in my ionic app but keeps getting the error
Given URL is not allowed by the application configuration: One or more of the given URLs is not allowed by the app settings. To use this URL you must add a valid native platform in your App's settings.
I added the platform and saved it. What am I doing wrong over here ?
The error you are getting in the console is because your app isn't configured properly in the Facebook Developers page.
Check your config.xml
<widget id="com.ionicframework.coaching154009" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
We need the widget id. Then go to facebook (developer mode obviously), check your app.
Configuration->Basic->Add platform->Android.
Google play app name-> .
In this case: com.ionicframework.coaching154009
Google play app name: com.ionicframework.coaching154009
Then accept and save changes.
Cross reference #404
Refer these links as well -
#1
#2
#3
I am using ionic 2 to build my app. I have uploaded my app to ionic view. My app id is 779eb729
I lost my code locally.
How can i download the code uploaded to ionic view?
I have tried the following
Entering app Id to download it as a zip using the below link.
https://apps.ionic.io/settings/data
Getting error as below.
<Error>
<script/>
<Code>NoSuchKey</Code>
The specified key does not exist.</Message>
<Key>e5ca31a4-6c38-11e7-8adb-0a16d4594913.zip</Key>
<RequestId>214F9C8D72CC27EF</RequestId>
<HostId>
m7KAm/NPBiADxHzhMs8z9lbqHEQni+4wvxRHNlK+tyTH9JHDcsW95hhqth87u2Ds7XrpJZCbwoU=
</HostId>
`'
Using ionic view app.
I dont seee my apps listed in the app when i click on load app.
I can see the list when i log into pc, not in mobile app.
Can u pls help me in downloading the app. My app id is 779eb729
I am wrapping a web app I have built in an Ionic 2 application so the client can release on the app store(s).
I am using:
https://ionicframework.com/docs/native/in-app-browser/
Which correctly loads up my testing IP but any anchor tags open up in the normal Safari browser. How can I keep the user within the in app browser?
This is how I set up the browser:
const browser = this.iab.create('my.ip.add.ress');
browser.show();
I have tried changing the links on my website to use all of the following variations:
target="_blank"
target="_system"
target="_self"
But nothing works.