Hi all. This is my first post on StackOverflow, though I have been making use of this site for a several years. Usually I'm able to find an answer to any queries that I may have, by referring to questions that others have asked; however, in this case I am completely stumped, despite having done quite a bit of homework already
I am currently in the process of developing an Android application which is required to communicate with a piece of hardware - more specifically a PIC32 board - and display data that is returned by the board in real-time.
At present I have simply been using Eclipse and Android emulator for designing the interface and programming the backend of the application. And, I have now gotten to a stage where I would like to test the operation of the application on a physical Android device. However, whenever I attempt to install the application, directly from the phone (I send the .apk via Dropbox) I always get the error 'The application Package installer (process com.android.packageinstaller) has stopped unexpectedly. Please try again'. Now, I have done my homework and seemed to have determined that the error may lie in the Android Manifest file for the application. However, I just cannot see where this issue may be. I have seen other issues resolved by removing certain tags or replicated tags; however, even then my application does not want to install on my device, though it installs and works pretty much perfectly everytime when run through the emulator.
The application I am developing is based loosely on the Demo code provided by the hardware manufacturer. It has been appropriately modified. And, when I appropriately modified the Manifest file for my application and tested it with the demo application everything seemed to work fine on a physical device. So, something is telling me that the Manifest file may not actually be the issue. The key differences between my application and the demo application is that I have divided the code up into appropriate packages, such that one contains application code (activities) and the other contains code for communicating with the PIC32 board. I have also added an activity - the demo code only has one, but have two at present. The final difference is that I have defined a global object, for communicating with the board, that can be used by all of the application's activities. However, I don't believe that these would be the cause of this issue.
So again, the application seems to work fine on the emulator, but it simply does not want to install on a physical Android device - everytime I try to install I get an alert dialog box displaying this message.
I would very much appreciate any help and advice that anybody could provide, and thanks in advance.
Also, here is the Manifest file for the application I am developing:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tribosonics.android.TribosonicsApp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" >
</uses-sdk>
<uses-sdk android:targetSdkVersion="10" >
</uses-sdk>
<!--
<permissions>
<feature name="android.hardware.usb.accessory" />
<library
name="com.android.future.usb.accessory"
file="/system/framework/com.android.future.usb.accessory.jar" />
</permissions>
-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:name=".GlobalAccessoryManager"
android:debuggable="true"
android:icon="#drawable/tribosonics_icon"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
</intent-filter>
<meta-data
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
android:resource="#xml/accessory_filter" />
<activity
android:name=".TribosonicsApp"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SetScanPreferences"
android:screenOrientation="portrait" >
</activity>
<uses-library android:name="com.android.future.usb.accessory" />
</application>
</manifest>
android manifest, icon image is big so please reduce your image icon size and run the application it's working fine.
I saw this with the following exception in LogCat:
E/AndroidRuntime(28817): FATAL EXCEPTION: main
E/AndroidRuntime(28817): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.example.app/.MyActivity } from ProcessRecord{487978e8 28817:com.android.packageinstaller/10063} (pid=28817, uid=10063) requires android.permission.ACCESS_FINE_LOCATION
I thought the problem was due to some <uses-permission...> tags in the manifest but in my case there was an android:permission="..." attribute in my manifests application tag which seemed to be causing the package manager to get the exception and barff. Deleting this got me going again.
change changing android:debuggable="true" to android:debuggable="false" and see if it makes any difference.
Related
Up to API 29 tts is working fine on android to speak out any text
But on API 30 tts is not working anymore and i do not know why
The google documentation says :
"Apps targeting Android 11 that use text-to-speech should declare TextToSpeech.Engine#INTENT_ACTION_TTS_SERVICE in the elements of their manifest"
I do not exactly know what they mean and how to implement this in the manifest.
I hope anybody can help me with this.
Although probably not the best answer (or maybe just a glitch on Androids part) add the following code just above the <application in your manifest.
<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>
<application
android:allowBackup="false"
After adding this code my TTS service started to work again, but I do get a warning from the manifest file about it not being allowed there, but anywhere in the manifest gives this same warning so I suppress it with <!--suppress AndroidElementNotAllowed --> just above the <manifest tag at the top.
#jayce's answer helps if app is targeting the Android 11
https://developer.android.com/reference/android/speech/tts/TextToSpeech
Note: sorry for the noise but I don't have enough reputation to put my comment there.
I have tested this app on the Android emulators, phones, tablets, and Google TV. Its works. When I published it Google Play, the app is not visible. Below is the manifest. I sincerely appreciate any insight as to the problem. Thank- you.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.zzzz.xyzxyz"
android:installLocation="internalOnly"
android:versionCode="4"
android:versionName="1.4" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.hardware.microphone"
android:required="false" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:resizeable="true"
android:smallScreens="true" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".AlbumSelectorActivity"
android:label="#string/app_name"
android:launchMode="singleTask" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="xyzxyzAppWidgetActivity"
android:noHistory="true" >
</activity>
<activity
android:name=".SelectableImagesActivity"
android:noHistory="true" >
</activity>
<activity
android:name=".SelectedImageActivity"
android:noHistory="true"
android:windowSoftInputMode="stateHidden|adjustResize" >
</activity>
<activity
android:name=".ReplayAlbumActivity"
android:noHistory="true"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize" >
</activity>
<activity android:name=".PreferenceHelpActivity" >
<category android:name="android.intent.category.PREFERENCE" >
</category>
</activity>
<activity android:name=".PreferenceSettingsActivity" >
<category android:name="android.intent.category.PREFERENCE" >
</category>
</activity>
<service android:name=".ReplayAlbumService" >
<intent-filter>
<action android:name="com.zzzz.xyzxyz.ReplayAlbumService" />
</intent-filter>
</service>
<activity
android:name=".xyzxyzAppWidgetConfigureActivity"
android:icon="#drawable/ic_launcher"
android:label="#string/appwidget_name" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<receiver
android:name=".xyzxyzAppWidgetProvider"
android:icon="#drawable/ic_launcher"
android:label="#string/appwidget_name" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/appwidget_provider" />
</receiver>
</application>
</manifest>
Just try it on your browser setting the link:
https://play.google.com/store/apps/details?id=yourpackagename
even if it's not indexed in the search, if it's published you will find it, if not, somethings wrong then
I ran into this problem (or a similar one). I submitted my app on the internal test track and soon after, in the Google play Console, it said my app is Published and provided a link to go to Google Play Store to download the app. However, when I clicked the link, it would tell me the requested URL could not be found. I also could not find the app in the Google Play Store by searching for it.
The solution:
Apparently, I had to add myself to the testers group and more importantly - opt in. I found the opt-in link in Google play Console:
On the left, click "Release Management"
"App releases"
Go to the version you have uploaded and click "MANAGE".
Click on "Manage testers". There, you will find an opt-in URL.
Try searching with exact name in double quotes ""
like for eg: "ZipDrive"
it might take some time to index it. Until that you might not find it in the search. It is also posible that you don't see it because it doesn't match the device you use to search for it. Or the country you're in.
I had been waiting ~11 hours and still it wasn't online... until I realised I'd published it but it was still in Beta. I never used the Google Play Alpha/Beta testing features but I still had to click on the button under the Beta tab to "Move to Production".
Here is my first hand experience. I published my first app on the Google play store (GPS) on October 15th. Was pretty excited to locate on GPS. But yes the same experience, it didn't show up.
Then here is the series of events:
1. Day 1 to Day 3
When searched using double quotes "Cool Tic Tac Toe", I could see at the bottom of the search list - at the last almost after 200 items, but yes it was there which made me happy.
2. Day 4 onwards -
I removed the quotes and searched by app name with the spaces i.e. Cool Tic Tac Toe, it showed up almost at the bottom.
In the mobile or tablet version of Play Store app, you will see filters like "New" "4.5" or "4.0" for ratings. So when I used the filters New and 4.5 in the play store app, it started showing up almost in the first few pages.
3. Day 6-7
My app now shows up at the top (in top 10) when I put the exact app name without any quotes and without using any filters - this is very good sign. So far I have about 100 downloads (most from my friends and family and not from any real user I would imagine as no one in the world will really search my app with its full name.
I realize visitors of GPS would not know my app name, they will search with a generic key word like Tic Tac Toe and not Cool Tic Tac Toe
Day 7 onwards - today(8th day)
I search my app with generic name Tic Tac Toe in GPS, it doesn't show up ANYWHERE, not even at the bottom. This is a little disappointing, but I do hope it will crawl up and start showing somewhere.
HOWEVER If I add the filters "New" and "4.5" it does show up in top 25. This I think is a good sign. I will update more on this if I see any related behavior.
Hope this helps give some idea to my fellow developers who have put their first app in GPS and trying to locate it in the ocean of many millions of other apps.
I tried all the above solutions but I just realised someone can do this below-mentioned mistake too.
In Play Console, go to Setup-> Advanced settings in the left pane.
Select Managed Google Play
Choose the Turn off option, if you want your app to be publicly available.
Since you've waited a sufficient amount of time and it should appear, you can try checking your APK to see what default permissions and features your app requires using aapt:
$ aapt d badging your.apk
Make sure that what is listed for features is not filtering your device. You can mostly do this on Google Play too, but I have seen a few differences where Google Play will show that it is available for older devices, but it actually will not install.
Also, as suggested by #ricvieira, you should do a query in a web browser to see if your app shows up at all.
I keep getting this weird error message every time I'm testing my app on the Android emulator. It pops up every few seconds non-stop and constantly interrupts me. It's really annoying and I have no clue how to get rid of it, or what it even says. I guess it's in German but I tried translating it using Google, and made no sense of the body, only the title which barely made any sense.
Does someone know how to fix this problem?
Link to image: http://oi54.tinypic.com/v4bcqv.jpg
I'm a new user so I can't post images
*EDIT: I tried uninstalling all the applications I created from the emulator. The message is still there. Below is my manifest file (which someone said might be the cause of the problem): *
<application android:icon="#drawable/icon" android:label="#string/app_name" android:debuggable="true" android:enabled="true">
<activity android:name=".QuizSplashActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="QuizGameActivity"></activity>
<activity android:name="QuizHelpActivity"></activity>
<activity android:name="QuizMenuActivity"></activity>
<activity android:name="QuizScoresActivity"></activity>
<activity android:name="QuizSettingsActivity"></activity>
</application>
PROBLEM FIXED: apparently all I had to do was replace the AVD with a new one
hey,
this is dutch and not german language. i also typed it in the google translator and thats what came out:
"Care, because the application component is enabled. malicious applications can use this to key phone functions off. an authorization must be carefully considered, since application components unusable, inconsistent, or could become unstable."
guess that can be caused by a missing entrance in the manifest file or something like that.
hope the better translation can help you a bit.
That is extremely weird, I've never seen anything like that before. Few questions to try and help you troubleshoot:
Does this happen with only one of your applications?
Are you using any third-party libraries?
When you try to run the application from a different computer, do you have this problem?
Is this only on the emulator or when you try to run it on your phone too?
I have an app, let us call it 'com.company.foo', with a main Activity 'FooBar'. In my AndroidManifest.xml, I have
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
<activity android:name="FooBar"
android:label="#string/app_name"
android:configChanges="keyboardHidden|orientation" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</application>
(where the dots contain other activities inside my app). In this form, it works fine on my HTC desire and on the emulator. However, a (very) small number of people who downloaded the app from the market report a crash with
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.company.foo/com.company.foo.FooBar}: java.lang.ClassNotFoundException: com.company.foo.FooBar in loader dalvik.system.PathClassLoader[/mnt/asec/com.company.foo-1/pkg.apk]
Someone suggested to replace the android:name="FooBar" with android:name=".FooBar", which again works fine on my phone and the emulator, but fails on some other devices. If I leave this attribute out altogether it will not let me install at all.
Any ideas?
I have an app published on Android Market. And sometimes I receive similar crash reports. Seems that's not your fault. This can be reproduced if your app is installed on SD card. Eject this card without unmounting it and run your app.
Additional information can be found here.
The code that you have shown is fine, can't see anything wrong with it - so what else have you looked at?
Have you checked the SDK level against the android release on teh phones that have failed? Any chance of some incompatability there?
Instantiating the activity I have found to my cost is a non-trivial matter and there are so many things to go wrong - you will have to go back over all your support files and make sure that they are clean but think about incompatabilities.
You have not said what imports are involved - have you tried cutting down your app to the bare minimum and see does it still cause problems with those small number of rogue phone - maybe you dont have access to the phones?
Try posting the phone makes/models that are causing problems, also where to access your app and there might be someone out here with the same make/model who would be willing to do some testing for you
Sorry I can't be more help,
Good Luck!!
Oliver
I'm trying to parse some html using jsoup (1.3.3) in my android activity. When I call this code
Jsoup.connect("http://www.google.com").get();
It works fine in android 2.1 and 2.2 but in 1.6 I get a "java.io.IOException: 403 Error loading URL".
I'm using the emulator to test this and I've noticed that admob ads are also not showing in 1.6 but they work in 2.0, 2.1 and 2.2.
Using the web browser in the 1.6 emulator does work so I'm pretty confident the problem is in my code somewhere.
Is there some extra permission I need for internet access in 1.6 that you don't need in 2.0+?
This is how my manifest file is structured, does the position of the uses-permission tag have any effect?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.foo.bar"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<application android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"
android:name="blahblah"
android:description="#string/app_desc">
<activity android:label="#string/app_name" android:name=".activities.MainMenu">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activities.FullList" android:label="#string/app_name"/>
<!-- The application's publisher ID assigned by AdMob -->
<meta-data android:value="blahblahblah" android:name="ADMOB_PUBLISHER_ID" />
</application>
<uses-sdk android:minSdkVersion="4"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
I've tried creating a new project from scratch with just a hello world screen that uses the Jsoup.connect() method and that works fine on the same 1.6 emulator, so it must be a code problem but I can't figure it out.
JSOUP internally uses HttpURLConnection. Here is the line throwing exception.
The internet connection is OK (or else it would throw exception earlier) and you are getting a reply from server which is: 403 HTTP FORBIDDEN
Is there some kind of login in place? Do check that you can open the same URL in browser on the same device/emulator.
Try inserting /uses-sdk near the end of the script or try deleting /uses-permission with each surrounded with angle brackets
I've tried creating a new project from scratch with just a hello world screen that uses the Jsoup.connect() method and that works fine on the same 1.6 emulator, so it must be a code problem but I can't figure it out.
Try putting a test usage of this early in your application startup (or if that causes an ANR timeout, add a "test" button)
Make a copy of your application and comment a lot of things out
Somewhere between your minimal test which works and your full application which doesn't, there lies an important difference. Recursively divide the difference and conquer it...