SIP API SipManeger returns null - android

I'm trying to use SIP API in my android application and geting some strange situation. If i'm use VitrualBox device with android 4.2.2 it's work well, but when i'm installing the same app to real devices with the same android version it says that SipManager.newInstance(this) return null and getApiVersion() return false(Testing on Lenovo & GSmart). But when i'm installing another SIP application from play market to device it works well.
I'm trying to find reason, maybe that device firmware some strange but other SIP app works. Can you help to find solution to solve this and get SipManager on device?
Manifest file
<uses-permission android:name="android.permission.USE_SIP" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-feature
android:name="android.hardware.sip.voip"
android:required="true" />
<uses-feature
android:name="android.hardware.wifi"
android:required="true" />
<uses-feature
android:name="android.hardware.microphone"
android:required="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".WalkieTalkieActivity"
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=".SipSettings"
android:label="set_preferences" />
<receiver
android:name=".IncomingCallReceiver"
android:label="Call Receiver" />
</application>
Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.uniphone.dev3.siptest"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}

So, all i find is that (custom)android phone firmware still goes disgusting with SIP and not all devices can run SIP API. And only one case is to use 3d party library on C++.
As final i used JAIN-SIP java library from Oracle.
Examples i found at Mobicents/restcomm-android-sdk

Related

0 supported devices in google play store

I uploaded the apk on the play store and it says 0 devices are supported, I changed targeted sdk also, as it was suggested in another answer but it did not work.
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eadevelopers.tatto">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<permission android:name="com.eadevelopers.tatto.CAMERA" />
<uses-feature android:name="android.hardware.camera" android:required="true"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />
<uses-feature android:name="android.hardware.camera2.full" android:required="true"/>
<application
android:name="com.eadevelopers.tatto.Global"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/icon_80"
android:label="#string/app_name"
android:largeHeap="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.eadevelopers.tatto"
minSdkVersion 14
targetSdkVersion 27
versionCode 3
versionName "1.2"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled false
}
debug {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
minifyEnabled false
}
}
}
dependencies {
implementation files('libs/mint-5.1.0.jar')
implementation 'com.android.support:support-v4:25.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.google.android.gms:play-services-ads:15.0.0'
}
These are my manifest and gradle files. I have changed target sdk version but that did not work I think the problem is somewhere in permissions but I don't know where. I already uploaded 3 apks with changes but the supported devices are still 0.
ok I got the fixed. comment by Jay.
Remove <permission android:name="com.eadevelopers.tatto.CAMERA" /> and add 'android:required="false"' to all uses-feature. – Jay Jun 28 at 8:08

Supported Android Devices = zero

My app can't be found when someone looks for it from their google play app on their Android phone. (shows find when searched from browser). This is because Google Play says my app supports "0 devices".
The support chat person at Google play says this is the reason:
"Your app is not compatible with certain devices due to a conflict in your app’s manifest with the following: no supported native platform:
armeabi, armeabi-v7a, and missing device features: android.hardware.faketouch, android.hardware.screen.portrait"
I can't figure out what the heck that means.
My manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.deanblakely.SafeTalk"
android:installLocation="preferExternal"
android:versionCode="30"
android:versionName="1.06 " >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="25" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<!--android:theme="#android:style/Theme.NoTitleBar" -->
<activity android:name="SplashActivity"
android:label="#string/app_name"
android:theme="#style/SplashTheme">
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="MainActivity"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:configChanges="orientation|keyboardHidden"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:theme="#style/AppTheme.NoActionBar"
>
</activity>
<receiver
android:name="com.deanblakely.SafeTalk.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.deanblakely.SafeTalk" />
</intent-filter>
</receiver>
<service android:name="com.deanblakely.SafeTalk.GcmIntentService" />
</application>
</manifest>
My gradle file is as follows:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy' //httpClient not supported in 23.
lintOptions { disable 'MissingTranslation' }
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
}
signingConfigs {
releaseConfig {
storeFile file("XXXXXXXXXXXXXXXXX");
storePassword ("XXXXXXXXXX");
keyPassword ("XXXXXXXXXX");
keyAlias "XXXXX
}
}
buildTypes {
release {
minifyEnabled false
debuggable false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig signingConfigs.releaseConfig
}
debug {
debuggable true
applicationIdSuffix ".debug"
}
}
flavorDimensions "stupidDimensionone"
productFlavors {
scFlavor
{
applicationId 'com.deanblakely.SafeTalk.sc'
dimension "stupidDimensionone"
}
safetalkFlavor
{
applicationId "com.deanblakely.SafeTalk"
dimension "stupidDimensionone"
}
}
}
dependencies {
compile project(':dropboxChooserSDK')
compile files('libs/gson-2.2.4.jar')
compile files('libs/microsoft-translator-java-api-0.6.2-jar-with-dependencies.jar')
compile 'com.android.support:appcompat-v7:25+'
compile 'com.android.support:design:25+'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
}
This didn't used to be this way. I suppose it is another breaking change. Anyone know what is causing this?
As usual I am answering my own question . . .
I made the following replacement in my gradle . . .
//compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'commons-io:commons-io:2.6'
I found a post from somebody else that had the same problem. I don't know why it works and neither did the original person with the problem. I think this is either caused by buggy Google Play software and/or a complete lack of documentation.
Usually this problem are about configuration permision or uses feature
In this case looks the problem is like this:
<uses-feature android:name="android.hardware.bluetooth" />
<uses-feature android:name="android.hardware.camera" />
Check the users feature you need to change in the DOCUMENTATION

This app is incompatible with your device

I have just made an android application tested on "HUAWEI T1-701u" AND "HUAWEI T1-A21L", i have generated a signed apk and it's now published on the play store,
the problem is the app just working on anything i have expect HUAWEI T1-701u even i tested on it, it says something like this: app is not compatible with this device, even i tested on it.
here is the manifest
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<supports-screens android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:requiresSmallestWidthDp="100" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.NoActionBar">
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
and here is the gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "org.iowpjordan.mpic"
minSdkVersion 12
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
}
Please note that the screen size of HUAWEI T1-701u is 7 inch and the other one is 10 approximately
Please advice.
Regards.
the features in manifest are too sensitive if do you put a useless feature and you don't have it on your phone then the app will not be compatible with your phone
if you are not using Autofocus,remove this line <uses-feature android:name="android.hardware.camera.autofocus" />
because the phone which are you testing on, doesn't have autofocus feature! that's why the app will not be compatible with your device
You have mentioned targetSdkVersion 19 in build.gradle file.
It will work for only kitkat devices.
What is the android version of the device that you are testing?

Google Play Compatibility Issue

I have released an app on Google Play that has a minimum API level of 17 (Android 4.2).
I have a test phone running Android 4.4.2.
The app is currently released only as beta. When I attempt to download it, it says its not compatible.
Has anyone got any ideas what could cause this?
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.delaneybiometrics.delaneymobile"
minSdkVersion 17
targetSdkVersion 23
versionCode 9
versionName "0.9"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'org.apache.httpcomponents:httpcore:4.4.3'
compile 'org.apache.httpcomponents:httpclient:4.5'
}
Here is the Manifest...
<?xml version="1.0" encoding="utf-8"?>
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<!--<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>-->
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.front"
android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".PunchActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".OnSiteActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".RegisterActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".TourActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
To fix, remove the <uses-feature android:name="android.hardware.camera.autofocus" /> tag from your manifest. But dont worry, as the docs say below, your app will still work properly
http://developer.android.com/reference/android/hardware/Camera.AutoFocusCallback.html
Devices that do not support auto-focus will receive a "fake" callback
to this interface. If your application needs auto-focus and should not
be installed on devices without auto-focus, you must declare that your
app uses the android.hardware.camera.autofocus feature, in the
manifest element.

Google Maps api2 with Android Studio issue

Using Eclipse I converted several Google Maps v1 to v2 without many problems. One of my services uses the V1 GeoPoint class a great deal and I was able to use the code unaltered by importing import com.google.android.maps.GeoPoint. I have a half dozen apps running maps V2 with using this GeoPoint class.
Now I'm over on Android Studio converting my last maps V1 app to maps V2 but even though I have the same import statement I'm getting an exception at at run time when I reference the GeoPoint class. Saying...
NoClassDefFoundError: Failed resolution of: Lcom/google/android/maps/GeoPoint.
So the same code runs fine when testing in Eclipse but blows when testing in Android Studio.
EDIT: The GeoPoint class compiles fine in AS it just blows at run time. I don't know what would cause this.
If it helps I include my manifest file and the module Build.gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.deanblakely.mttTrial"
minSdkVersion 10
targetSdkVersion 21
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile project(':library')
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.code.gson:gson:2.2.2'
compile 'com.google.android.gms:play-services:+'
}
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.deanblakely.mttTrial"
android:versionCode="22"
android:versionName="2.22" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="21" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name="com.deanblakely.mttTrial.PSActivity"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar" >
</activity>
<activity
android:label="#string/app_name"
android:name="com.deanblakely.mttTrial.LicenseCheck"
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>
<uses-library android:name="com.google.android.maps" />
</activity>
<service
android:name="com.deanblakely.mttTrial.StalkService"
android:exported="false" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="not the actual key" />
<!--' Release key is not the actual release key'-->
<!--' Debug key is not the actual debug key'-->
</application>
<!-- Required permission to check licensing. -->
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
</manifest>
Improve your build.gradle
compile 'com.google.android.gms:play-services:5.0.89'
And add this your Manifest
<uses-permission android:name="com.deanblakely.mttTrial.permission.MAPS_RECEIVE" />

Categories

Resources