Can't get Xamarin Android Example to work - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1
  • 2

TOPIC: Can't get Xamarin Android Example to work

Can't get Xamarin Android Example to work 10 months 1 week ago #13302

  • gongtom
  • gongtom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 1
Hi,
I am trying to get the Xamarin Android Example to work for many hours now:
www.radaeepdf.com/support/knowledge-base?view=kb&kbartid=80

I followed each step exactly, some seem to be outdated, for example #5 Now add the project dependency, right click on TestRadaee->Build Dependencies->Project Dependencies: doesn't seem to be there anymore.

But every other step succeeded. I can also build the project, but at this line:
mPdfManager.Show(this, "file:///mnt/sdcard/Download/pdf/Test.pdf", "");
an error ist always throwen:
Android.Content.ActivityNotFoundException: Unable to find explicit activity class {com.radaee.reader.TestRadaeeAndroid/com.radaee.reader.PDFViewAct}; have you declared this activity in your AndroidManifest.xml?
I googeled a lot and tried to make it work, but nothing succeeded.
Also tried to change the reference to PDFViewAct in the AndroidManifest to only use the class name as suggested a lot.

Hope someone has a quick solution. Seems like a tiny fault on my side, but can't find it. :(

Tanks in advance,
Thomas.

Please Log in or Create an account to join the conversation.

Can't get Xamarin Android Example to work 10 months 6 days ago #13304

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
It's not outdated, it was created based on VS 2015 (are you using a different version?)
We have just recreated a project following these steps, and it works.

Please Log in or Create an account to join the conversation.

Can't get Xamarin Android Example to work 10 months 5 days ago #13309

  • gongtom
  • gongtom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 1
Thanks for the reply.
Yes, I am using Visual Studio Community for Mac 2017. Everything looks ab bit different than in the tutorials and as I said, the main difference is, that I can't find project dependencies in my version of Visual Studio.
Just for the record: The iOS Version of the Tutorial works like a charm. :) Hope to get the Android version to work too, wold be a nice solution for what I need.

Please Log in or Create an account to join the conversation.

Can't get Xamarin Android Example to work 10 months 4 days ago #13313

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
The tutorial was created based on Windows version, and we've verified that it's working with VS 2017 (windows)
In Mac version it should be sufficient to edit the preferences (the Edit References dialog, which is displayed by double-clicking on the References folder, or by selecting Edit References on its context menu actions).

The manifest of the working example is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.radaee.reader" android:versionCode="1" android:versionName="1.0" android:installLocation="auto">
	<uses-sdk android:minSdkVersion="21" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
	<application android:allowBackup="true" android:label="@string/app_name">
		<activity android:name="com.radaee.reader.PDFViewAct" android:configChanges="orientation|keyboardHidden|screenSize" android:theme="@android:style/Theme.NoTitleBar" />

     <activity android:name="com.radaee.util.PopupEditAct" android:theme="@android:style/Theme.Translucent" android:configChanges="orientation|keyboardHidden|screenSize" /></application>
</manifest>

Is your manifest different?
The following user(s) said Thank You: gongtom

Please Log in or Create an account to join the conversation.

Can't get Xamarin Android Example to work 10 months 3 days ago #13318

  • gongtom
  • gongtom's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 1
Ah, I got it. The problem was indeed the manifest. I didn't put the two activities inside the application node. My fault, I am more an iOS developer adding some android capabilities via xamarin at the moment. Sorry. :unsure: But I don't know if I am the only one, maybe someone could add a hint to the Tutorial, that you have to put the activity node inside the application node, even if it might be clear to every native android developer.
Maybe another quick question, I guess you can answer in a second. Of course I will not use the android and iOs examples I created in my main project, but can I do the same thing in my main xamarin.Froms project? Just copying the RadaeePDF-Xamarin-master project into my main project, configure it for iOS and android add the license and I am ready to go?

Please Log in or Create an account to join the conversation.

Can't get Xamarin Android Example to work 10 months 3 days ago #13320

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
We have updated the tutorial and added the application node to the example in point 9.
Sure, and if you face any issues you can always ask for help.
The following user(s) said Thank You: gongtom

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum