[android-developers] Digest for android-developers@googlegroups.com - 17 updates in 10 topics

mu.huber@gmail.com: Feb 28 10:13AM -0800

Hey Community
 
I have made an app for Android, but the Play Store doesnt think its Tablet
optimized. Its full responsive and looks good on all devices (Tablet/Phone)
i have tested. I have not used breakpoints. I have tried to use diffrent
android-minSdkVersion but that doesnt help. Do you guys have an idea whats
wrong?
 
 
 
 
<https://lh3.googleusercontent.com/-x5slxv0tgQw/VtM4qX9ny6I/AAAAAAAAAOU/wzvdbsTgdS4/s1600/config.png>
 
<https://lh3.googleusercontent.com/-JpgH0Al1J38/VtM4tB5RspI/AAAAAAAAAOY/QP7NvI664aY/s1600/PlayStore.png>
 
 
<https://lh3.googleusercontent.com/-3hOevy7pm38/VtM4gjlV_FI/AAAAAAAAAOQ/SNw_WvTHxkA/s1600/Bildschirmfoto%2B2016-02-28%2Bum%2B18.53.18.png>
Steve Gabrilowitz <steveg1701@gmail.com>: Feb 28 02:55PM -0500

Did you upload tablet screen shots to the Play Store description?
mu.huber@gmail.com: Feb 28 12:34PM -0800

I do not have made real screenshots of an 7" and an 10" tablet. I just
uploaded the same screenshot for both.
 
mu.huber@gmail.com: Feb 28 12:32PM -0800

Yes i have two screenshots there (minimum) Do you think that causes the
problem and not the config.xml?
 
Am Sonntag, 28. Februar 2016 21:07:04 UTC+1 schrieb Steve Gabrilowitz:
 
Did you upload tablet screen shots to the Play Store description?
Kostya Vasilyev <kmansoft@gmail.com>: Feb 29 12:23AM +0300

I think they have some sort of logic (behind the publishing console) to
detect if your tablet screenshots are sufficiently different from phone
screenshots.
 
I once contacted Play support about it -- and they wrote back that my app
doesn't look sufficiently different on tablets, so will not get the
"optimized for tablets" in its listing.
 
They wanted whole different layouts, not just bigger fonts or wider padding.
 
So there is human moderation too, it seems.
 
-- K
 
"mu.huber" <mu.huber@gmail.com>: Feb 28 10:37PM +0100

Actually i hope this is not causing the problem because its a simple game
for cats. It makes no sense to have a diffrent layout.
 
I have zero experience in making apps but i think the problem is somewhere
else, even if the apk (i have generated from mt html5/javascript/css
folder) works perfectly fine, installed directly on doffrent devices.
 
I have no other tests running on that apk other than on real devices.
Steve Gabrilowitz <steveg1701@gmail.com>: Feb 28 06:27PM -0500


> Yes i have two screenshots there (minimum) Do you think that causes the
problem and not the config.xml?
 
Several things can cause that issue, including not having the proper screen
shots. Maybe try posting your manifest file?
 
 
>> On Feb 28, 2016 1:14 PM, <mu.h...@gmail.com> wrote:
 
>>> Hey Community
 
>>> I have made an app for Android, but the Play Store doesnt think its
Tablet optimized. Its full responsive and looks good on all devices
(Tablet/Phone) i have tested. I have not used breakpoints. I have tried to
use diffrent android-minSdkVersion but that doesnt help. Do you guys have
an idea whats wrong?
 
>>> --
>>> You received this message because you are subscribed to the Google
Groups "Android Developers" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
an email to android-developers+unsubscribe@googlegroups.com.
>>> To post to this group, send email to android-d...@googlegroups.com.
 
>>> Visit this group at https://groups.google.com/group/android-developers.
>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/7857f475-2506-445b-8ee9-f0c57f3383e9%40googlegroups.com
.
>>> For more options, visit https://groups.google.com/d/optout.
 
> --
> You received this message because you are subscribed to the Google Groups
"Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to android-developers+unsubscribe@googlegroups.com.
> To post to this group, send email to android-developers@googlegroups.com.
> Visit this group at https://groups.google.com/group/android-developers.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/android-developers/88955200-661b-440f-897a-6484bc37d683%40googlegroups.com
.
"Buğra Öztürk" <ozturkbugra93@gmail.com>: Feb 28 01:40PM -0800

Me and my friends try to make a Android Wear app that will communicate with
Beacons. We have to provide bluetooth connection between our wear and
beacon in our program. But we have not found any information about Android
wear bluetooth connection code example or something else. If there is a any
informations you knew, pls tell me and rescue me this struggle. Our wear is
Sony Smart Watch 3 by the way. Thank you for now.
"Dino Velić" <meme.applications@gmail.com>: Feb 28 11:00AM -0800

Hello,
 
I've published my game for children on 11th of February.
 
I've flagged my AdMob in code with tagForChildDirectedTreatment, but users
are still seeing other inappropriate ads, like dating ads.
 
I can't find any contact info of Admob. Is there anything I can do?
 
I'm a bit embarassed by this problem, because I wouldn't want my child to
see anything inappropriate, let alone somebody else's child.
 
Dino
"Dino Velić" <meme.applications@gmail.com>: Feb 28 10:59AM -0800

Hello,
 
I've published my game for children on 11th of February.
 
I've flagged my AdMob in code with tagForChildDirectedTreatment, but users
are still seeing other inappropriate ads, like dating ads.
 
I can't find any contact info of Admob. Is there anything I can do?
 
I'm a bit embarassed by this problem, because I wouldn't want my child to
see anything inappropriate, let alone somebody else's child.
 
Dino
Ignacio O <ignacio030866@gmail.com>: Feb 28 09:55AM -0800

I update windows 8 to windows 10 an my IDE now have a diferente languaje in
menus, idont now how change, add an image.
 
 
<https://lh3.googleusercontent.com/-7UfIdHn9fUs/VtM0hw0G6wI/AAAAAAAAB5c/Bfr1yaugERE/s1600/ide.png>
 
 
HELP ME!!!!!
gjs <garyjamessilva@gmail.com>: Feb 27 10:36PM -0800

Hi
 
Try https://cloud.google.com/solutions/mobile/appengine-endpoints-mobile-app
 
Regards
"Cowboy1Brian ." <brian.kjames75@gmail.com>: Feb 28 10:55AM -0600

Thank you Gary. I look forward to diving into this.
 
Leonidas Savvides <developer.lse@gmail.com>: Feb 28 05:20AM -0800

A Used Car Company that handles many brands of cars asked my Mobile
Development Office to develop for them,... 10 top brand cars Apps, one App
per car brand...
 
About usage of Car brand logos eg BMW Logo
 
I can go to company car brand Logo (Press) section - find a logo and put in
Home Page... this with stating clearly in App title and H1 titles that App
is About BMW Used Cars...?
 
This I cannot do is find a logo from Google Images even logo states only
the brand - and is the same as above... logo from Press office of brand?
 
*these are correct 1st-can , 2nd-cannot...???*
Zakaria Zouitni <zakariaa.zouitni@gmail.com>: Feb 28 05:02AM -0800

Thnks you so much Shane Carr, thats look greet (y)
 
 
Ken Tavin <shiftykevapps@gmail.com>: Feb 28 04:58AM -0800

Hello fellow developers!
 
 
I am trying to integrate Admob interstitials/pop ups into a Corona SDK
game. Does anyone know how to scroll or animate the adMob interstitial
itself. For instance, when the adMob interstitial is called, rather than
popping up directly onto the
phone screen, it slides in/scrolls in from the bottom and then up to fill
the entire screen? I've tried searching through online for any official
documentation but have had no luck.
 
Any help would be much appreciated.
 
Thanks aplenty
 
Ken
"Ezequiel R. Zorzal" <ezorzal@gmail.com>: Feb 28 04:25AM -0800

I'm trying to implement the GCM service in my application, but I'm having
trouble sending the TOKEN to my server.
Please help me with this problem. Even in my class does not print logs in
my logcat. However, when I run the app it generates the following:
 
 
02-26 11:32:29.684 11399-11537/mycompany I/b: Sending API token request.
02-26 11:32:30.025 11399-11537/mycompany I/b: Received API Token:
AH0uPGGC ... zZfMp / Expires in: 432000000ms
02-26 11:32:30.034 11399-11537/mycompany I/g: Saved auth token
 
 
I want to take this token and send it to my server.
Thank you!
See my code below:
 
*AndroidManifest.xml*
 
...

<!-- [START gcm_permission] -->
<uses-permission android:name=
"com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- [END gcm_permission] -->

<permission
android:name="mycompany.permission.C2D_MESSAGE"
android:protectionLevel="signature" />

<uses-permission android:name="mycompany.permission.C2D_MESSAGE" />

...

<!-- [START gcm_listener] -->
<service
android:name="mycompany.GCM.MyGcmListenerService"
android:exported="false" >
<intent-filter>
<action android:name=
"com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- [END gcm_listener] -->
<!-- [START instanceId_listener] -->
<service
android:name="mycompany.GCM.MyInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name=
"com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<!-- [END instanceId_listener] -->
<service
android:name="mycompany.GCM.RegistrationIntentService"
android:exported="false">


</service>
...
 
 
*MyGcmListenerService.java*
 
...

public class MyGcmListenerService extends GcmListenerService {

private static final String TAG = "MyGcmListenerService";


/**
* Called when message is received.
*
*
* @param from SenderID of the sender.
* @param data Data bundle containing message data as key/value
pairs.
* For Set of keys use data.keySet().
*/
// [START receive_message]
@Override
public void onMessageReceived(String from, Bundle data) {
String message = data.getString("message");
Log.d(TAG, "From: " + from);
Log.d(TAG, "Message: " + message);

if (from.startsWith("/topics/")) {
// message received from some topic.
} else {
// normal downstream message.
}

// [START_EXCLUDE]
/**
* Production applications would usually process the message
here.
* Eg: - Syncing with server.
* - Store message in local database.
* - Update UI.
*/

/**
* In some cases it may be useful to show a notification
indicating to the user
* that a message was received.
*/
sendNotification(message);
// [END_EXCLUDE]
}
// [END receive_message]

/**
* Create and show a simple notification containing the received
GCM message.
*
* @param message GCM message received.
*/
private void sendNotification(String message) {
Intent intent = new Intent(this, MapActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /*
Request code */, intent,
PendingIntent.FLAG_ONE_SHOT);

Bitmap bm = BitmapFactory.decodeResource(getResources(), R.
drawable.icone);

Uri defaultSoundUri = RingtoneManager.getDefaultUri(
RingtoneManager.TYPE_NOTIFICATION);
NotificationCompat.Builder notificationBuilder = new
NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.icone2)
.setLargeIcon(bm)
.setContentTitle("Title")
.setContentText(message)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent);

NotificationManager notificationManager =
(NotificationManager) getSystemService(Context.
NOTIFICATION_SERVICE);

notificationManager.notify(0 /* ID of notification */,
notificationBuilder.build());
}
}
 
 
 
 
*MyInstanceIDListenerService.java*
 
 
 
public class MyInstanceIDListenerService extends
InstanceIDListenerService {

private static final String TAG = "MyInstanceIDLS";

/**
* Called if InstanceID token is updated. This may occur if the
security of
* the previous token had been compromised. This call is initiated
by the
* InstanceID provider.
*/
// [START refresh_token]
@Override
public void onTokenRefresh() {
// Fetch updated Instance ID token and notify our app's server
of any changes (if applicable).
Intent intent = new Intent(this, RegistrationIntentService.class
);
startService(intent);
}
// [END refresh_token]
}
 
 
*QuickstartPreferences.java*
 
 
public class QuickstartPreferences {

public static final String SENT_TOKEN_TO_SERVER =
"sentTokenToServer";
public static final String REGISTRATION_COMPLETE =
"registrationComplete";

}
 
 
*RegistrationIntentService.java*
 
 
public class RegistrationIntentService extends IntentService {

private static final String TAG = "RegIntentService";
private static final String[] TOPICS = {"global"};



public RegistrationIntentService() {
super(TAG);
}


@Override
protected void onHandleIntent(Intent intent) {
SharedPreferences sharedPreferences = PreferenceManager.
getDefaultSharedPreferences(this);

try {
// [START register_for_gcm]
// Initially this call goes out to the network to retrieve
the token, subsequent calls
// are local.
// R.string.gcm_defaultSenderId (the Sender ID) is
typically derived from google-services.json.
// See
https://developers.google.com/cloud-messaging/android/start for details on
this file.
// [START get_token]
String authorizedEntity = "XXXXXXXX"; // Project id from
Google Developers Console
String scope = "GCM"; // e.g. communicating using GCM, but
you can use any


//InstanceID instanceID = InstanceID.getInstance(this);
String token = InstanceID.getInstance(this).getToken(
authorizedEntity,scope);
// String token = instanceID.getToken(authorizedEntity,
GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);
//send token to app server

Log.d(TAG, "GCM Registration Token: " + token); //NOT PRINT


// TODO: Implement this method to send any registration to
your app's servers.
sendRegistrationToServer(token);

// Subscribe to topic channels
subscribeTopics(token);

// You should store a boolean that indicates whether the
generated token has been
// sent to your server. If the boolean is false, send the
token to your server,
// otherwise your server should have already received the
token.
sharedPreferences.edit().putBoolean(QuickstartPreferences.
SENT_TOKEN_TO_SERVER, true).apply();
// [END register_for_gcm]
} catch (Exception e) {
Log.d(TAG, "Failed to complete token refresh", e);
// If an exception happens while fetching the new token or
updating our registration data
// on a third-party server, this ensures that we'll attempt
the update at a later time.
sharedPreferences.edit().putBoolean(QuickstartPreferences.
SENT_TOKEN_TO_SERVER, false).apply();
}
// Notify UI that registration has completed, so the progress
indicator can be hidden.

Intent registrationComplete = new Intent(QuickstartPreferences.
REGISTRATION_COMPLETE);
LocalBroadcastManager.getInstance(this).sendBroadcast(
registrationComplete);
}



/**
* Persist registration to third-party servers.
*
* Modify this method to associate the user's GCM registration
token with any server-side account
* maintained by your application.
*
* @param token The new token.
*/
private void sendRegistrationToServer(String token) {
// Add custom implementation, as needed.
//Enviar para servidor
Log.e("TOKEN:", token); //NOT PRINT

HttpURLConnection connection;
OutputStreamWriter request = null;

URL url = null;
String response = null;

String param = "dtoken="+token+"&dtype=Android";
try {
url = new URL("http://myurl.com/action.php");
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type",
"application/x-www-form-urlencoded");
connection.setRequestMethod("POST");

request = new OutputStreamWriter(connection.getOutputStream
());
request.write(param);
request.flush();
request.close();
String line = "";
InputStreamReader isr = new InputStreamReader(connection.
getInputStream());
BufferedReader reader = new BufferedReader(isr);
StringBuilder sb = new StringBuilder();
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
isr.close();
reader.close();

} catch (IOException e) {
// Error
}


}


/**
* Subscribe to any GCM topics of interest, as defined by the
TOPICS constant.
*
* @param token GCM token
* @throws IOException if unable to reach the GCM PubSub service
*/
// [START subscribe_topics]
private void subscribeTopics(String token) throws IOException {
GcmPubSub pubSub = GcmPubSub.getInstance(this);
for (String topic : TOPICS) {
pubSub.subscribe(token, "/topics/" + topic, null);
}
}
// [END subscribe_topics]

}
 
 
 
 
 
Thanks for helping me!
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to android-developers+unsubscribe@googlegroups.com.

No comments:

Post a Comment