Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

File type Association

$
0
0

i'm developing a program to encrypt and decrypt files i want to files with ".enc" extension open with my application.

after some research i find that i should manipulate manifest file like this :

`<?xml version="1.0" encoding="utf-8"?>

  <!-- For http -->
  <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="http" />
    <data android:host="*" />
    <data android:pathPattern=".*\\.enc" />
    <data android:pathPattern=".*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.enc"/>
    <data android:mimeType="*/*" />
  </intent-filter>

  <!-- For https -->
  <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="https" />
    <data android:host="*" />
    <data android:pathPattern=".*\\.enc" />
    <data android:pathPattern=".*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.enc"/>
    <data android:mimeType="*/*" />
  </intent-filter>

  <!-- For file browsers and google drive -->
  <intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:scheme="file" />
    <data android:host="*" />
    <data android:pathPattern=".*\\.enc" />
    <data android:pathPattern=".*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.enc"/>
    <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.enc"/>
    <data android:mimeType="*/*" />
  </intent-filter>

</activity>

`

when i click on .enc files, my application is trying to open but an error will occur and said :

"Unfortunately Ramznegar has stopped"

i don't know what should i set in this line of Manifest

<activity android:name="com.Xamarin.Test">

when i set one of my activity like this :

<activity android:name="Ramznegar.Ramznegar.OpenFile"> i got this error : Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>