I´m trying to develop a Native Extension for Flex in order to use the Dropbox API for Android. I have already tried this dropbox-r33 module for FLEX but it`s deprecated for Android 4, so this is not a solution for me.
I have already an ANE with Vibration and Dropbox connection. Vibration works perfectly (example from the web) and I tried to include the functions to use Dropbox API for Android (I have already tested it in an Android project and it works).
The problem is that I´ve been force to unpack the classes from the .jars needed in the Dropbox API in order that my ANE recognizes them but I´m getting this error:
05-29 12:02:21.489: I/ConnectionError(5798): android.content.ActivityNotFoundException: Unable to find explicit activity class {air.TestVibrationExtension.debug/com.dropbox.client2.android.AuthActivity}; have you declared this activity in your AndroidManifest.xml?
where TestVibrationExtension is my ANE´s project name. My package name is air.extensions and in that folder I have included the unpacked dropbox api classes (under air.extension.com and air.extensions.org).
Who has worked with Dropbox API knows that in the AndroidManifest you have to include the following activity declaration:
<activity
android:name="com.dropbox.client2.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask" >
<intent-filter>
<!-- Change this to be db- followed by your app key -->
<data android:scheme="db-myAppKey" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
I think the error is related to that activity declaration but I don´t know what to do in order my ANE recognizes it.
Help please!
Dropbox-r33.swc module works but it is necessary to upload AIR library to it latest version. Doing it works on every Android platform perfectly.
Related
I've published an app to Google Play which uses the "Let Google Sign the App" option (yeah, I'm a dummy for doing that). I've downloaded the derived APK from Play Console and imported into Android Studio. When I try to run it I get the "Default Activity not found" error.
The manifest has a default activity specified (See below). I've tried clearing cache, changing run config to "None" activity, etc.
All ideas are welcome!
<activity
android:theme="#ref/0x0103000a"
android:label="#ref/0x7f090014"
android:name="com.godot.game.GodotApp"
android:launchMode="2"
android:screenOrientation="1"
android:configChanges="0x1ff0"
android:resizeableActivity="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
This appears to be a bug in ASv4.0 or incompatibility between Godot Android export template and ASv4.0.
Downgraded to ASv3.6.3 and all is good.
If you are using Godot to build Android apps, recommend you do not upgrade Android Studio to v4.0
I made an android app with External library. But I don't know why, when I install my apk(only one), installed two apps. One is mine and the other one is an example project of the external library. I think when I started my app, I had to understand how the library works, so I put that example project in my project.
But I can't find the example library's activity or layout somethings, and I don't know where to delete the settings of install example library. It seems like ghost...
you should check AndroidManifest.xml in your 3rd library and remove
<intent-filter>
<action android:name = "android.intent.action.MAIN" />
<category android:name = "android.intent.category.LAUNCHER" />
</intent-filter>
I upgraded my project from Eclipse to Android Studio.
Everything is working, including different flavors (in Eclipse I had an ANT script that auto-generated the sourcecode for the different flavors).
I can also generate the different signed APK's. And these all work on the device.
Also uploading these APK's to GooglePlay is no problem.
User also get these updates, but after the update they need to re-create the shortcut to the app on the home screen. The old shortcut is removed.
I believe this is due to the fact that "Android Studio" modifies stuff in the AndroidManifest.xml when generating the APK.
In Eclipse source, in Android studio source and when I inspect the Eclipse generated APK I have the following (with the name being .StartUpActivity) :
<activity android:name=".StartUpActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
However, when I look into the generated apk from Android Studio this is modified to :
<activity android:name="be.abc.android.StartUpActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
So the name has been changed from .StartUpActivity to be.abc.android.StartUpActivity.
In the end, this is the same path but I believe the shortcut just looks at the name .StartUpActivity, and decides it is no longer available and removes the shortcut....
Can I fix this in someway that the shortcuts don't get deleted. Or that Android Studio doesn't mess with the shortened package names in the AndroidManifest.xml ?
Indeed, as soon as you modify the launcher manifest entry, the shortcut has to be recreated. To avoid such issue, you can make use of activity-alias. A step-by-step guide can be found here.
I wanted to tweak a piece of sample code from API Demos group - GridLayout0. For it I created a separate project and copied GridLayout0.java into it. Now when I try to see the results of my changes, I get in the LogCat is
Uploading GridLayoutSampleTwicked.apk onto device '0388920542204257'
Installing GridLayoutSampleTwicked.apk...
Success!
/GridLayoutSampleTwicked/bin/GridLayoutSampleTwicked.apk installed on device
Done!
Apparently the apk is successfully installed on the device, but I don't see the app in the list of apps where I could launch it from (Wasn't it supposed to launch right after it was installed anyway?)
I am a noob, might have missed something.
If it matters, while creating the new project Eclipse asked me about the "root parent." I had to link it back to the API Demos package because Eclipse wouldn't let me proceed with the new project.
verify if this element exist in your main activity on manifest.xml :
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Yes, this part was missing. Adding this and deleting the snippet I gave below launched the app as I wanted it to.
Eclipse generated this code and I don't quite understand what it does
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.android.apis.view.GridLayout0" />
I'm really new in Android Development and, like many others, I'm trying desperately to integrate ZXing into my project. I have to make a stand-alone QR scanning application for Android. (I'm using the 2.3.3 sdk).
I have to explain that I've already tried to find a solution to my problem by reading all the answers about the topic but I haven't suceed at all.
Here is what I've done:
I downloaded the ZXing 2.0 Release from here
Then, I added the assets, src and res to my project simply by dragging the files into my
project.
I referenced the core.jar archive located in the "core" folder by right-clicking in my
project > Build Path > Configure Build Path. I add ir as an External JAR.
This is a image to ilustrate.
In here, I was getting some errors in the ID's and some other resources. That was
happening because I was referencing to que wrong R.java, so I solved that by changing "import com.google.zxing.client.android.R" to "import com.android.novaqr.R", which is my projects
package.
Then I added:
<uses-permission android:name="android.permission.CAMERA"/>
and
<activity android:name="com.google.zxing.client.android.CaptureActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
to the AndroidManifest.xml
So now I have no errors in my code and here is where i need help: I need the phone to scan when I push a button. I've tried a lot of solutions that I saw on the other questions about this topic, but I haven't succeed.
I hope I'm clear with my question, if not, let me know and I'll try to be more specific
Any help will be really apreciated.
You are strongly discouraged from completely copying and pasting our app. It sounds like you're not experienced enough in Android to use it this way anyway.
Instead, you can use the app's scanning service by Intent, which is far easier and supported: http://code.google.com/p/zxing/wiki/ScanningViaIntent