packaging wearable app in eclipse - android

I have read all posts that developers page(https://developer.android.com/training/wearables/apps/packaging.html) about packaging wear.
I've tryed step by step everything and nothing works, the wear app never gets installed on the watch. APK installed on my phone, but not in my watch. They have the same package name, permissions, versionCode and versionName.
Each app works well!
I debugged local host:4444, (computer and phone connected via USB connecter, bluetooth connected phone and watch) in eclipse.
problem
the wear app never gets installed on the watch(usb connect smartphone, debug smartphone application)
When I bluetooth debuging an app for smart phones, occurs an error.(usb connect smartphone and wear connect bluetooth debug, debug smartphone application)
why don't installed my watch application? how to solve problem? and what should I debug that phone app or watch app in local host:4444 via bluetooth? If "Turn off Asset Compression" need to me? help me!
code
watch manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.abced.abc"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>"
<uses-permission android:name="android.permission.VIBRATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/app_mark"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:exported="true"
android:allowEmbedded="true"
android:taskAffinity=""
android:theme="#android:style/Theme.DeviceDefault.Light" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
phone manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.abcde.abc"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>"
<uses-permission android:name="android.permission.VIBRATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/app_mark"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data android:name="com.google.android.wearable.beta.app"
android:resource="#xml/wear_desc"/>
<activity
android:name="com.abcde.abc.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
wear_desc.xml / apk name : abc.apk
<?xml version="1.0" encoding="utf-8"?>
<wearableApp package="com.abcde.abc">
<versionCode>1</versionCode>
<versionName>1.0</versionName>
<rawPathResId>abc</rawPathResId>
</wearableApp>

Among many requirements, you must have the exact same permissions on both sides, it looks like you forgot android.permission.WAKE_LOCK on the phone manifest.
You also need <uses-feature android:name="android.hardware.type.watch" /> in the Wear manifest.

Related

This app is incompatible with your device in play store(Galaxy S5, Only READ_PHONE_STATE Permission)

I just developed a simple widget "SIM Info Widget", which shows very basic information like SIM State, Serial Number, Operator Name etc.
For any of the information just I need an Instance of TelephonyManager and "android.permission.READ_PHONE_STATE" permission.
When I directly run the app in my Phone(Samsung Galaxy S5/G900I) through Eclipse, it got installed and running perfectly.(Screenshot is attached)
But when I published it in Google Play, It says This app is incompatible with your device
The Manifest is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ragini.siminfowidget"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:label="Detials of SIM"
android:name="MyWidgetProvider" >
<intent-filter >
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/widget_basics" />
</receiver>
</application>
</manifest>
Can any body please suggest me why it is happening, Because my phone supports Cellular Activities like Calling, SMS etc, Still the problem occurs.
Screenshot

install apk on samsung tablet, but I cant find it?

I have installede a app I made. When I run it from eclipse it works, but I cant find it anywhere on my tablet, when I click program (where all the apps are, it is not there) but when I run programmangere I can see it is there. I tried to download it from link, and it install, but I can still not find it anywhere on my tablet.
Any ides??
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.learn2crack.tab"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<uses-permission android:name="android.permission.MOUNT_FORMAT_FILESYSTEMS"/>
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.learn2crack.tab.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:mimeType="text/html" />
</intent-filter>
</activity>
</application>
First connect the tablet to your pc then copy your apk file which is in the bin then paste it in your phone memory. now disconnect your device.. Goto FileManager in your tablet find the .apk and click on it install it and then open it... Hope ths will work

Error: Activity class {} does not exist

My application launches well both on Nexus 7 and Nook Tablet, but doesn't start on Kindle Fire with the following error:
Error: Activity class {com.js.pathoflight/com.js.pathoflight.JSNativeActivity} does not exist.
Here is my manifest complete:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.js.pathoflight"
android:versionCode="3"
android:versionName="0.8.3">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:allowBackup="true"
android:hasCode="true" >
<activity android:name=".JSNativeActivity"
android:label="#string/app_name"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<meta-data android:name="android.app.lib_name"
android:value="PathOfLight" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It seems like a device issue, but I have another (similar) application which runs on the same device well.
How can I solve it?
The real problem was that there were another application with the same package name on device (I tried a sample and gave it my real app package name)! When I removed it everything became working right!

Reason for AVD not beeing compatible with project

When Im starting my AVD emulator from within Android studio the list of devices in the emuator shows that some of my devices are not compatible with the current project.
It doesn´t show what is not compatible. Is there any way to get to know that?
My first guess was conflicting API versions. But that seems not to be the case sice several AVD:s have the same api settings and some are compatible and others not.
This is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".SetLocation"
android:label="SetLocation"/>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
</manifest>
And a screenshot of the list:
maybe if your applications are written for lover API version that device that you will use for testing. Can you run the application in emulator?

App fails with permission when try to debug on Android 4.0 device

I've written app for Android 2.2 (target version) and I tried to run it on device with Android 4.0.3 but it fails with granting permission for internet connection. It run without problems on Android 2.3. Is there any way to run that app on A4.0 without changing target SDK version?
My AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pl.niemier.allegro"
android:versionCode="1"
android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:debuggable="true">
<activity
android:name=".MainActivity"
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=".ShowAuctionActivity"></activity>
<activity android:name=".SearchFormActivity"></activity>
<activity android:name=".UserInfoActivity"></activity>
<activity android:name=".ConfigPanelActivity"></activity>
</application>
</manifest>
Try adding the SDK target version in you manifest file:
<uses-sdk android:minSdkVersion="8" />
Please check if the version number is correct.
I assume you have added <uses-permission android:name="android.permission.INTERNET" /> since it works on Android 2.3.

Categories

Resources