android:versioncode and android:versionname how to make my sdk compatible - android

I just decompiled an APK so that I can see the how the app works.
I imported the project but it's almost completely red for errors.
Do I have to change something in the Manifest?
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2" android:versionName="1.1" package="com.jesstech.bluetooth.bledemo"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application android:theme="#*android:style/Theme.Holo.Light" android:label="#string/app_name" android:icon="#drawable/ic_launcher" android:allowBackup="false">
<activity android:label="#string/app_name" android:name="com.jesstech.bluetooth.bledemo.DeviceScanActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.jesstech.bluetooth.bledemo.DeviceControlActivity" />
<service android:name="com.jesstech.bluetooth.bledemo.BluetoothLeService" android:enabled="true" />
</application>
</manifest>

your Manifest should be this way
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jesstech.bluetooth.bledemo"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application android:theme="#*android:style/Theme.Holo.Light" android:label="#string/app_name" android:icon="#drawable/ic_launcher" android:allowBackup="false">
<activity android:label="#string/app_name" android:name="com.jesstech.bluetooth.bledemo.DeviceScanActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.jesstech.bluetooth.bledemo.DeviceControlActivity" />
<service android:name="com.jesstech.bluetooth.bledemo.BluetoothLeService" android:enabled="true" />
</application>
</manifest>
and for the sdk
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="19" /> depends on your SDK version

Related

Android : Can't show the package name of installed app inside Android/data/<package name>

This is my manifest file
i dont think there is a anything wrong in java file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.abd.xyz" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/UnityThemeSelector" >
<activity
android:name=".Activity"
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=".UnityPlayerActivity"
android:screenOrientation="sensorLandscape">
<meta-data
android:name="unityplayer.UnityActivity"
android:value="true" />
</activity>
</application>
</manifest>
App is running well but in Myfile/android/data/ there is no package name of that installed app
You can not see the content of Android/data/<package name> unless your device is rooted.
Content of Android/data/<package name> is not visible to user.

BOOT_COMPLETED on Lollipop

My boot receiver not starting. I've read many topics here and there but couldn't find working solution. My manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hahaido.rescuetap"
android:installLocation="internalOnly"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="#drawable/start"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver
android:name=".BootReceiver"
android:enabled="false" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<service android:name=".LockService" />
</application>
</manifest>
It works on Android 4.1 but why is it not working on 5.0?
android:enabled="false" - initially the receiver is disabled but user can control its state from the app

Add Flash player to WEBVIEW (android)

I'm working on my new "app" and I have a problem when I'm trying to show videos into my app (webview) but I got this message:
http://i.stack.imgur.com/p1rEM.png
How to solve it??
Thanks all!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.pskpartha.droidwebview"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:hardwareAccelerated="true"
>
<activity
android:configChanges="keyboard|keyboardHidden|orientation"
android:name="com.google.ads.AdActivity"
>
</activity>
<activity
android:label="#string/app_name"
android:name=".SplashActivity">
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:configChanges="touchscreen|keyboardHidden|orientation"
android:launchMode="singleTop"
android:name="DroidWebViewActivity"
>
</activity>
</application>
</manifest>
Follow the steps on this link to manually install Flash Player on your device : https://forums.adobe.com/thread/1061194?tstart=0

Error compile in "Use Facebook Login" SDK

I have followed the Facebook "use Facebook Login" tutorial
However, when I load the app and click on "Login" I get the "com.facebook.FacebookException: Cannot use SessionLoginBehavior SSO_WITH_FALLBACK when com.facebook.LoginActivity is not declared as an activity in AndroidManifest.xml" error.
I definitely have added the activity in the AndroidManifest.xml file.
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.zwopper.LoginActivity"
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="com.zwopper.MainActivity"
android:label="#string/app_name" >
</activity>
<meta-data android:value="#string/app_id" android:name="com.facebook.sdk.ApplicationId"/>
</application>
Anyone know what is the problem?
(I have also added the *app_id* string to res/values/strings.xml, the INTERNET permission, the com.facebook.sdk.ApplicationId Meta Data)
Thanks.
define activity in your mainfest
<activity
android:name="com.facebook.LoginActivity"
android:label="#string/title_facebook_login" >
</activity>
One complet manifest with login in facebook:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.eltondcr.youvox"
android:versionCode="1"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<uses-feature
android:name="android.hardware.camera"
android:required="false" >
</uses-feature>
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.BATTERY_STATS" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<!--
<receiver android:name="com.example.ServiceAutoStarter" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
-->
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/app_id" />
<activity
android:name="com.eltondcr.youvox.HomeActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainActivity" />
<activity android:name=".GravacaoActivity" />
<activity android:name=".FBActivity" />
<activity
android:name="com.facebook.LoginActivity"
android:label="title_facebook_login" >
</activity>
</application>
<!-- <activity android:name=".HomeActivity" /> -->

Android Livewallpaper settings fail to load from 'configure...' menu

I am unable to load the live wallpaper preferences from 'Wallpaper>Configure...'.
The preferences load fine when i click the settings button from within the Livewallpaper menu.
Here are some screen shots to better explain the error:
Error Log
The manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.RrD"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application android:icon="#drawable/icon" android:label="#string/app_name"
android:permission="android.permission.BIND_WALLPAPER">
<service android:name=".LiveWallpaper"
android:label="#string/app_name"
android:icon="#drawable/icon">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="#xml/livewallpaper" />
</service>
<activity android:label="PAM_Prefs" android:name=".PAM_Prefs" android:theme="#android:style/Theme.Light.WallpaperSettings" android:exported="true" android:icon="#drawable/icon">
<uses-permission android:name="android.permission.BIND_WALLPAPER" />
</activity>
</application>
</manifest>
figured it out after tinkering around with the manifest file. Added an intent filter 'category.PREFERENCE' & moved BIND_WALLPAPER permission inside the service tag.
here is the new manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.RrD"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.software.live_wallpaper" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.BIND_WALLPAPER" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
>
<service android:name=".LiveWallpaper"
android:label="#string/app_name"
android:icon="#drawable/icon"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper"
android:resource="#xml/livewallpaper" />
</service>
<activity android:label="PAM_Prefs"
android:name=".PAM_Prefs"
android:exported="true" android:icon="#drawable/icon">
<intent-filter>
<category android:name="android.intent.category.PREFERENCE" />
</intent-filter>
</activity>
</application>
</manifest>

Categories

Resources